@azure/communication-react 1.23.0-alpha-202412200016 → 1.23.0-alpha-202412210016

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 (94) hide show
  1. package/dist/communication-react.d.ts +174 -15
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-bdhcp77f.js → ChatMessageComponentAsRichTextEditBox-9kQzqcEk.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-bdhcp77f.js.map → ChatMessageComponentAsRichTextEditBox-9kQzqcEk.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DCfnYa5y.js → RichTextSendBoxWrapper-CPU8bZEb.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DCfnYa5y.js.map → RichTextSendBoxWrapper-CPU8bZEb.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-O64dqfKP.js → index-C8ch4y0S.js} +840 -156
  7. package/dist/dist-cjs/communication-react/index-C8ch4y0S.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  13. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -8
  14. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +1 -1
  16. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +2 -2
  18. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +12 -25
  21. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  22. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +2 -2
  23. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  24. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +5 -5
  25. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  26. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  27. package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +2 -0
  28. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +11 -4
  29. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
  30. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +12 -0
  31. package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/components/ParticipantList.js +23 -4
  33. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  34. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +4 -0
  35. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +23 -5
  36. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  37. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.js +3 -1
  38. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.js.map +1 -1
  39. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.d.ts +1 -0
  40. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js +18 -9
  41. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js.map +1 -1
  42. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.d.ts +8 -0
  43. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +99 -14
  44. package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
  45. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +16 -0
  46. package/dist/dist-esm/react-components/src/components/VideoGallery.js +37 -11
  47. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +5 -0
  49. package/dist/dist-esm/react-components/src/components/VideoTile.js +18 -3
  50. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  51. package/dist/dist-esm/react-components/src/components/utils.js +8 -0
  52. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  53. package/dist/dist-esm/react-components/src/theming/icons.d.ts +5 -0
  54. package/dist/dist-esm/react-components/src/theming/icons.js +13 -1
  55. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  56. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +1 -1
  57. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +5 -2
  59. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  60. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +70 -0
  61. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  62. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +9 -0
  63. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +76 -10
  64. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  65. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +32 -0
  66. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  67. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +52 -10
  68. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  69. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js +4 -0
  70. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CapabilitiesChangedNotificationBar.js.map +1 -1
  71. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.d.ts +10 -0
  72. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +288 -26
  73. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
  74. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +1 -1
  75. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
  76. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +57 -8
  77. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  78. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +3 -0
  79. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +3 -0
  80. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +8 -0
  82. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +48 -0
  83. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  84. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +18 -0
  85. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  86. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +8 -0
  87. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +48 -0
  88. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +4 -0
  90. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +9 -2
  92. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  93. package/package.json +1 -1
  94. package/dist/dist-cjs/communication-react/index-O64dqfKP.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import React, { useCallback, useEffect, useMemo } from 'react';
3
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
4
4
  import { useIsParticularSidePaneOpen } from './SidePaneProvider';
5
5
  import { SidePaneHeader } from '../../../common/SidePaneHeader';
6
6
  import { PeoplePaneContent } from '../../../common/PeoplePaneContent';
@@ -11,7 +11,25 @@ import { Prompt } from '../Prompt';
11
11
  const PEOPLE_SIDE_PANE_ID = 'people';
12
12
  /** @private */
13
13
  export const usePeoplePane = (props) => {
14
- const { updateSidePaneRenderer, inviteLink, onFetchAvatarPersonaData, onFetchParticipantMenuItems, setDrawerMenuItems, mobileView, peopleButtonRef, setParticipantActioned, spotlightedParticipantUserIds, onStartLocalSpotlight, onStopLocalSpotlight, onStartRemoteSpotlight, onStopRemoteSpotlight, onStopAllSpotlight, maxParticipantsToSpotlight, onMuteParticipant, pinnedParticipants, onPinParticipant, onUnpinParticipant, disablePinMenuItem, onMuteAllRemoteParticipants } = props;
14
+ const { updateSidePaneRenderer, inviteLink, onFetchAvatarPersonaData, onFetchParticipantMenuItems, setDrawerMenuItems, mobileView, peopleButtonRef, setParticipantActioned, spotlightedParticipantUserIds, onStartLocalSpotlight, onStopLocalSpotlight, onStartRemoteSpotlight, onStopRemoteSpotlight, onStopAllSpotlight, maxParticipantsToSpotlight, onMuteParticipant, pinnedParticipants, onPinParticipant, onUnpinParticipant, disablePinMenuItem, onMuteAllRemoteParticipants,
15
+ /* @conditional-compile-remove(media-access) */
16
+ onForbidAudio,
17
+ /* @conditional-compile-remove(media-access) */
18
+ onPermitAudio,
19
+ /* @conditional-compile-remove(media-access) */
20
+ onForbidOthersAudio,
21
+ /* @conditional-compile-remove(media-access) */
22
+ onPermitOthersAudio,
23
+ /* @conditional-compile-remove(media-access) */
24
+ onForbidVideo,
25
+ /* @conditional-compile-remove(media-access) */
26
+ onPermitVideo,
27
+ /* @conditional-compile-remove(media-access) */
28
+ onForbidOthersVideo,
29
+ /* @conditional-compile-remove(media-access) */
30
+ onPermitOthersVideo,
31
+ /* @conditional-compile-remove(media-access) */
32
+ meetingMediaAccess } = props;
15
33
  const closePane = useCallback(() => {
16
34
  var _a;
17
35
  updateSidePaneRenderer(undefined);
@@ -19,7 +37,7 @@ export const usePeoplePane = (props) => {
19
37
  }, [peopleButtonRef, updateSidePaneRenderer]);
20
38
  const localeStrings = useLocale().strings.call;
21
39
  const remoteParticipants = useSelector(getRemoteParticipants);
22
- const [showMuteAllPrompt, setShowMuteAllPrompt] = React.useState(false);
40
+ const [showMuteAllPrompt, setShowMuteAllPrompt] = useState(false);
23
41
  const muteAllPromptLabels = useMemo(() => ({
24
42
  confirmButtonLabel: localeStrings.muteAllConfirmButtonLabel,
25
43
  heading: localeStrings.muteAllDialogTitle,
@@ -35,6 +53,34 @@ export const usePeoplePane = (props) => {
35
53
  onMuteAllRemoteParticipants && onMuteAllRemoteParticipants();
36
54
  setShowMuteAllPrompt(false);
37
55
  }, [onMuteAllRemoteParticipants, setShowMuteAllPrompt]);
56
+ /* @conditional-compile-remove(media-access) */
57
+ const [showForbidOthersAudioPrompt, setShowForbidOthersAudioPrompt] = useState(false);
58
+ /* @conditional-compile-remove(media-access) */
59
+ const [showPermitOthersAudioPrompt, setShowPermitOthersAudioPrompt] = useState(false);
60
+ /* @conditional-compile-remove(media-access) */
61
+ const [showForbidOthersVideoPrompt, setShowForbidOthersVideoPrompt] = useState(false);
62
+ /* @conditional-compile-remove(media-access) */
63
+ const [showPermitOthersVideoPrompt, setShowPermitOthersVideoPrompt] = useState(false);
64
+ /* @conditional-compile-remove(media-access) */
65
+ const onForbidAllAttendeesPromptConfirm = useCallback(() => {
66
+ onForbidOthersAudio && onForbidOthersAudio();
67
+ setShowForbidOthersAudioPrompt(false);
68
+ }, [onForbidOthersAudio, setShowForbidOthersAudioPrompt]);
69
+ /* @conditional-compile-remove(media-access) */
70
+ const onPermitAllAttendeesPromptConfirm = useCallback(() => {
71
+ onPermitOthersAudio && onPermitOthersAudio();
72
+ setShowPermitOthersAudioPrompt(false);
73
+ }, [onPermitOthersAudio, setShowPermitOthersAudioPrompt]);
74
+ /* @conditional-compile-remove(media-access) */
75
+ const onForbidOthersVideoPromptConfirm = useCallback(() => {
76
+ onForbidOthersVideo && onForbidOthersVideo();
77
+ setShowForbidOthersVideoPrompt(false);
78
+ }, [onForbidOthersVideo, setShowForbidOthersVideoPrompt]);
79
+ /* @conditional-compile-remove(media-access) */
80
+ const onPermitOthersVideoPromptConfirm = useCallback(() => {
81
+ onPermitOthersVideo && onPermitOthersVideo();
82
+ setShowPermitOthersVideoPrompt(false);
83
+ }, [onPermitOthersVideo, setShowPermitOthersVideoPrompt]);
38
84
  const sidePaneHeaderMenuProps = useMemo(() => {
39
85
  const menuItems = [];
40
86
  if (onMuteAllRemoteParticipants && remoteParticipants) {
@@ -62,6 +108,97 @@ export const usePeoplePane = (props) => {
62
108
  disabled: isAllMuted
63
109
  });
64
110
  }
111
+ /* @conditional-compile-remove(media-access) */
112
+ let hasAttendee = false;
113
+ /* @conditional-compile-remove(media-access) */
114
+ if (remoteParticipants) {
115
+ for (const participant of Object.values(remoteParticipants)) {
116
+ if (participant.role && participant.role === 'Attendee') {
117
+ hasAttendee = true;
118
+ break;
119
+ }
120
+ }
121
+ }
122
+ /* @conditional-compile-remove(media-access) */
123
+ const isMeetingAudioPermitted = meetingMediaAccess ? meetingMediaAccess.isAudioPermitted : true;
124
+ /* @conditional-compile-remove(media-access) */
125
+ const isMeetingVideoPermitted = meetingMediaAccess ? meetingMediaAccess.isVideoPermitted : true;
126
+ /* @conditional-compile-remove(media-access) */
127
+ if (onForbidOthersAudio && remoteParticipants) {
128
+ hasAttendee &&
129
+ isMeetingAudioPermitted &&
130
+ menuItems.push({
131
+ ['data-ui-id']: 'people-pane-forbid-all-attendees-audio',
132
+ key: 'forbidOthersAudio',
133
+ text: localeStrings.forbidOthersAudioMenuLabel,
134
+ iconProps: {
135
+ iconName: 'ControlButtonMicProhibited',
136
+ styles: { root: { lineHeight: 0 } }
137
+ },
138
+ onClick: () => {
139
+ setShowForbidOthersAudioPrompt(true);
140
+ },
141
+ ariaLabel: localeStrings.forbidOthersAudioMenuLabel,
142
+ disabled: !hasAttendee
143
+ });
144
+ }
145
+ /* @conditional-compile-remove(media-access) */
146
+ if (onPermitOthersAudio && remoteParticipants) {
147
+ hasAttendee &&
148
+ !isMeetingAudioPermitted &&
149
+ menuItems.push({
150
+ ['data-ui-id']: 'people-pane-permit-all-attendees-audio',
151
+ key: 'permitOthersAudio',
152
+ text: localeStrings.permitOthersAudioMenuLabel,
153
+ iconProps: {
154
+ iconName: 'ControlButtonMicOn',
155
+ styles: { root: { lineHeight: 0 } }
156
+ },
157
+ onClick: () => {
158
+ setShowPermitOthersAudioPrompt(true);
159
+ },
160
+ ariaLabel: localeStrings.permitOthersAudioMenuLabel,
161
+ disabled: !hasAttendee
162
+ });
163
+ }
164
+ /* @conditional-compile-remove(media-access) */
165
+ if (onForbidOthersVideo && remoteParticipants) {
166
+ hasAttendee &&
167
+ isMeetingVideoPermitted &&
168
+ menuItems.push({
169
+ ['data-ui-id']: 'people-pane-forbid-all-attendees-video',
170
+ key: 'forbidOthersVideo',
171
+ text: localeStrings.forbidOthersVideoMenuLabel,
172
+ iconProps: {
173
+ iconName: 'ControlButtonCameraProhibitedSmall',
174
+ styles: { root: { lineHeight: 0 } }
175
+ },
176
+ onClick: () => {
177
+ setShowForbidOthersVideoPrompt(true);
178
+ },
179
+ ariaLabel: localeStrings.forbidOthersVideoMenuLabel,
180
+ disabled: !hasAttendee
181
+ });
182
+ }
183
+ /* @conditional-compile-remove(media-access) */
184
+ if (onPermitOthersVideo && remoteParticipants) {
185
+ hasAttendee &&
186
+ !isMeetingVideoPermitted &&
187
+ menuItems.push({
188
+ ['data-ui-id']: 'people-pane-permit-all-attendees-video',
189
+ key: 'permitOthersVideo',
190
+ text: localeStrings.permitOthersVideoMenuLabel,
191
+ iconProps: {
192
+ iconName: 'ControlButtonCameraOn',
193
+ styles: { root: { lineHeight: 0 } }
194
+ },
195
+ onClick: () => {
196
+ setShowPermitOthersVideoPrompt(true);
197
+ },
198
+ ariaLabel: localeStrings.permitOthersVideoMenuLabel,
199
+ disabled: !hasAttendee
200
+ });
201
+ }
65
202
  if (onStopAllSpotlight && spotlightedParticipantUserIds && spotlightedParticipantUserIds.length > 0) {
66
203
  menuItems.push({
67
204
  key: 'stopAllSpotlightKey',
@@ -77,16 +214,30 @@ export const usePeoplePane = (props) => {
77
214
  items: menuItems
78
215
  };
79
216
  }, [
217
+ onMuteAllRemoteParticipants,
218
+ remoteParticipants,
219
+ /* @conditional-compile-remove(media-access) */
220
+ meetingMediaAccess,
221
+ /* @conditional-compile-remove(media-access) */
222
+ onForbidOthersAudio,
223
+ /* @conditional-compile-remove(media-access) */
224
+ onPermitOthersAudio,
225
+ /* @conditional-compile-remove(media-access) */
226
+ onForbidOthersVideo,
227
+ /* @conditional-compile-remove(media-access) */
228
+ onPermitOthersVideo,
80
229
  onStopAllSpotlight,
81
230
  spotlightedParticipantUserIds,
82
- localeStrings.stopAllSpotlightMenuLabel,
83
231
  localeStrings.muteAllMenuLabel,
84
- onMuteAllRemoteParticipants,
85
- setShowMuteAllPrompt,
86
- remoteParticipants
232
+ localeStrings.forbidOthersAudioMenuLabel,
233
+ localeStrings.permitOthersAudioMenuLabel,
234
+ localeStrings.forbidOthersVideoMenuLabel,
235
+ localeStrings.permitOthersVideoMenuLabel,
236
+ localeStrings.stopAllSpotlightMenuLabel
87
237
  ]);
88
238
  const onRenderHeader = useCallback(() => (React.createElement(SidePaneHeader, { onClose: closePane, headingText: localeStrings.peoplePaneTitle, dismissSidePaneButtonAriaLabel: localeStrings.dismissSidePaneButtonLabel, mobileView: mobileView !== null && mobileView !== void 0 ? mobileView : false })), [mobileView, closePane, localeStrings]);
89
239
  const onFetchParticipantMenuItemsForCallComposite = useCallback((participantId, myUserId, defaultMenuItems) => {
240
+ var _a, _b;
90
241
  let isPinned = pinnedParticipants === null || pinnedParticipants === void 0 ? void 0 : pinnedParticipants.includes(participantId);
91
242
  const _defaultMenuItems = [];
92
243
  const isSpotlighted = spotlightedParticipantUserIds === null || spotlightedParticipantUserIds === void 0 ? void 0 : spotlightedParticipantUserIds.includes(participantId);
@@ -110,6 +261,78 @@ export const usePeoplePane = (props) => {
110
261
  disabled: isMuted
111
262
  });
112
263
  }
264
+ /* @conditional-compile-remove(media-access) */
265
+ const remoteParticipant = remoteParticipants === null || remoteParticipants === void 0 ? void 0 : remoteParticipants[participantId];
266
+ /* @conditional-compile-remove(media-access) */
267
+ if ((remoteParticipant === null || remoteParticipant === void 0 ? void 0 : remoteParticipant.mediaAccess) &&
268
+ !remoteParticipant.mediaAccess.isAudioPermitted &&
269
+ (remoteParticipant === null || remoteParticipant === void 0 ? void 0 : remoteParticipant.role) === 'Attendee' &&
270
+ onPermitAudio) {
271
+ _defaultMenuItems.push({
272
+ key: 'permit-audio',
273
+ text: localeStrings.permitAudioMenuLabel,
274
+ iconProps: {
275
+ iconName: 'ControlButtonMicOn',
276
+ styles: { root: { lineHeight: '1rem', textAlign: 'center' } }
277
+ },
278
+ onClick: () => {
279
+ onPermitAudio([participantId]);
280
+ },
281
+ 'data-ui-id': 'participant-item-permit-microphone-button',
282
+ ariaLabel: localeStrings.permitAudioMenuLabel
283
+ });
284
+ }
285
+ /* @conditional-compile-remove(media-access) */
286
+ if (((_a = remoteParticipant === null || remoteParticipant === void 0 ? void 0 : remoteParticipant.mediaAccess) === null || _a === void 0 ? void 0 : _a.isAudioPermitted) && (remoteParticipant === null || remoteParticipant === void 0 ? void 0 : remoteParticipant.role) === 'Attendee' && onForbidAudio) {
287
+ _defaultMenuItems.push({
288
+ key: 'forbid-audio',
289
+ text: localeStrings.forbidAudioMenuLabel,
290
+ iconProps: {
291
+ iconName: 'ControlButtonMicProhibited',
292
+ styles: { root: { lineHeight: '1rem', textAlign: 'center' } }
293
+ },
294
+ onClick: () => {
295
+ onForbidAudio([participantId]);
296
+ },
297
+ 'data-ui-id': 'participant-item-forbid-microphone-button',
298
+ ariaLabel: localeStrings.forbidAudioMenuLabel
299
+ });
300
+ }
301
+ /* @conditional-compile-remove(media-access) */
302
+ if ((remoteParticipant === null || remoteParticipant === void 0 ? void 0 : remoteParticipant.mediaAccess) &&
303
+ !remoteParticipant.mediaAccess.isVideoPermitted &&
304
+ (remoteParticipant === null || remoteParticipant === void 0 ? void 0 : remoteParticipant.role) === 'Attendee' &&
305
+ onPermitVideo) {
306
+ _defaultMenuItems.push({
307
+ key: 'permit-video',
308
+ text: localeStrings.permitVideoMenuLabel,
309
+ iconProps: {
310
+ iconName: 'ControlButtonCameraOn',
311
+ styles: { root: { lineHeight: '1rem', textAlign: 'center' } }
312
+ },
313
+ onClick: () => {
314
+ onPermitVideo([participantId]);
315
+ },
316
+ 'data-ui-id': 'participant-item-permit-camera-button',
317
+ ariaLabel: localeStrings.permitVideoMenuLabel
318
+ });
319
+ }
320
+ /* @conditional-compile-remove(media-access) */
321
+ if (((_b = remoteParticipant === null || remoteParticipant === void 0 ? void 0 : remoteParticipant.mediaAccess) === null || _b === void 0 ? void 0 : _b.isVideoPermitted) && (remoteParticipant === null || remoteParticipant === void 0 ? void 0 : remoteParticipant.role) === 'Attendee' && onForbidVideo) {
322
+ _defaultMenuItems.push({
323
+ key: 'forbid-video',
324
+ text: localeStrings.forbidVideoMenuLabel,
325
+ iconProps: {
326
+ iconName: 'ControlButtonCameraProhibitedSmall',
327
+ styles: { root: { lineHeight: '1rem', textAlign: 'center' } }
328
+ },
329
+ onClick: () => {
330
+ onForbidVideo([participantId]);
331
+ },
332
+ 'data-ui-id': 'participant-item-forbid-camera-button',
333
+ ariaLabel: localeStrings.forbidVideoMenuLabel
334
+ });
335
+ }
113
336
  if (isSpotlighted) {
114
337
  const stopSpotlightMenuText = isMe
115
338
  ? localeStrings.stopSpotlightOnSelfMenuLabel
@@ -207,51 +430,90 @@ export const usePeoplePane = (props) => {
207
430
  ? onFetchParticipantMenuItems(participantId, myUserId, _defaultMenuItems)
208
431
  : _defaultMenuItems;
209
432
  }, [
433
+ pinnedParticipants,
210
434
  spotlightedParticipantUserIds,
211
- onStartLocalSpotlight,
212
- onStopLocalSpotlight,
213
- onStartRemoteSpotlight,
214
- onStopRemoteSpotlight,
215
- onFetchParticipantMenuItems,
216
435
  onMuteParticipant,
217
436
  remoteParticipants,
218
- localeStrings.stopSpotlightMenuLabel,
437
+ onPermitAudio,
438
+ onForbidAudio,
439
+ onPermitVideo,
440
+ onForbidVideo,
441
+ onFetchParticipantMenuItems,
442
+ localeStrings.permitAudioMenuLabel,
443
+ localeStrings.forbidAudioMenuLabel,
444
+ localeStrings.permitVideoMenuLabel,
445
+ localeStrings.forbidVideoMenuLabel,
219
446
  localeStrings.stopSpotlightOnSelfMenuLabel,
447
+ localeStrings.stopSpotlightMenuLabel,
220
448
  localeStrings.addSpotlightMenuLabel,
221
449
  localeStrings.startSpotlightMenuLabel,
222
450
  localeStrings.spotlightLimitReachedMenuTitle,
223
- maxParticipantsToSpotlight,
224
- pinnedParticipants,
225
- onPinParticipant,
226
- onUnpinParticipant,
227
- disablePinMenuItem,
451
+ localeStrings === null || localeStrings === void 0 ? void 0 : localeStrings.unpinParticipantMenuLabel,
228
452
  localeStrings.pinParticipantMenuLabel,
229
- localeStrings.pinParticipantLimitReachedMenuLabel,
230
- localeStrings.unpinParticipantMenuLabel,
231
453
  localeStrings.unpinParticipantMenuItemAriaLabel,
232
- localeStrings.pinParticipantMenuItemAriaLabel
454
+ localeStrings.pinParticipantLimitReachedMenuLabel,
455
+ localeStrings.pinParticipantMenuItemAriaLabel,
456
+ onStopLocalSpotlight,
457
+ onStopRemoteSpotlight,
458
+ maxParticipantsToSpotlight,
459
+ onStartLocalSpotlight,
460
+ onStartRemoteSpotlight,
461
+ onUnpinParticipant,
462
+ onPinParticipant,
463
+ disablePinMenuItem
233
464
  ]);
234
465
  const role = useSelector(getRole);
235
466
  const alternateCallerId = useSelector(getAlternateCallerId);
236
467
  const onRenderContent = useCallback(() => {
237
468
  return (React.createElement(React.Fragment, null,
238
469
  React.createElement(Prompt, Object.assign({}, muteAllPromptLabels, { styles: { main: { minWidth: '22.5rem', padding: '1.5rem' } }, onConfirm: () => onMuteAllPromptConfirm(), isOpen: showMuteAllPrompt, onCancel: () => setShowMuteAllPrompt(false) })),
470
+ /* @conditional-compile-remove(media-access) */
471
+ React.createElement(Prompt, { heading: localeStrings.forbidOthersAudioDialogTitle, text: localeStrings.forbidOthersAudioDialogContent, confirmButtonLabel: localeStrings.forbidOthersAudioConfirmButtonLabel, cancelButtonLabel: localeStrings.forbidOthersAudioCancelButtonLabel, styles: { main: { minWidth: '22.5rem', padding: '1.5rem' } }, onConfirm: () => onForbidAllAttendeesPromptConfirm(), isOpen: showForbidOthersAudioPrompt, onCancel: () => setShowForbidOthersAudioPrompt(false) }),
472
+ /* @conditional-compile-remove(media-access) */
473
+ React.createElement(Prompt, { heading: localeStrings.permitOthersAudioDialogTitle, text: localeStrings.permitOthersAudioDialogContent, confirmButtonLabel: localeStrings.permitOthersAudioConfirmButtonLabel, cancelButtonLabel: localeStrings.permitOthersAudioCancelButtonLabel, styles: { main: { minWidth: '22.5rem', padding: '1.5rem' } }, onConfirm: () => onPermitAllAttendeesPromptConfirm(), isOpen: showPermitOthersAudioPrompt, onCancel: () => setShowForbidOthersAudioPrompt(false) }),
474
+ /* @conditional-compile-remove(media-access) */
475
+ React.createElement(Prompt, { heading: localeStrings.forbidOthersVideoDialogTitle, text: localeStrings.forbidOthersVideoDialogContent, confirmButtonLabel: localeStrings.forbidOthersVideoConfirmButtonLabel, cancelButtonLabel: localeStrings.forbidOthersVideoCancelButtonLabel, styles: { main: { minWidth: '22.5rem', padding: '1.5rem' } }, onConfirm: () => onForbidOthersVideoPromptConfirm(), isOpen: showForbidOthersVideoPrompt, onCancel: () => setShowForbidOthersVideoPrompt(false) }),
476
+ /* @conditional-compile-remove(media-access) */
477
+ React.createElement(Prompt, { heading: localeStrings.permitOthersVideoDialogTitle, text: localeStrings.permitOthersVideoDialogContent, confirmButtonLabel: localeStrings.permitOthersVideoConfirmButtonLabel, cancelButtonLabel: localeStrings.permitOthersVideoCancelButtonLabel, styles: { main: { minWidth: '22.5rem', padding: '1.5rem' } }, onConfirm: () => onPermitOthersVideoPromptConfirm(), isOpen: showPermitOthersVideoPrompt, onCancel: () => setShowForbidOthersVideoPrompt(false) }),
239
478
  React.createElement(PeoplePaneContent, { inviteLink: inviteLink, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItemsForCallComposite, setDrawerMenuItems: setDrawerMenuItems, mobileView: mobileView, setParticipantActioned: setParticipantActioned, participantListHeadingMoreButtonProps: sidePaneHeaderMenuProps, pinnedParticipants: pinnedParticipants, role: role, alternateCallerId: alternateCallerId })));
240
479
  }, [
480
+ muteAllPromptLabels,
481
+ showMuteAllPrompt,
482
+ localeStrings.forbidOthersAudioDialogTitle,
483
+ localeStrings.forbidOthersAudioDialogContent,
484
+ localeStrings.forbidOthersAudioConfirmButtonLabel,
485
+ localeStrings.forbidOthersAudioCancelButtonLabel,
486
+ localeStrings.permitOthersAudioDialogTitle,
487
+ localeStrings.permitOthersAudioDialogContent,
488
+ localeStrings.permitOthersAudioConfirmButtonLabel,
489
+ localeStrings.permitOthersAudioCancelButtonLabel,
490
+ localeStrings.forbidOthersVideoDialogTitle,
491
+ localeStrings.forbidOthersVideoDialogContent,
492
+ localeStrings.forbidOthersVideoConfirmButtonLabel,
493
+ localeStrings.forbidOthersVideoCancelButtonLabel,
494
+ localeStrings.permitOthersVideoDialogTitle,
495
+ localeStrings.permitOthersVideoDialogContent,
496
+ localeStrings.permitOthersVideoConfirmButtonLabel,
497
+ localeStrings.permitOthersVideoCancelButtonLabel,
498
+ showForbidOthersAudioPrompt,
499
+ showPermitOthersAudioPrompt,
500
+ showForbidOthersVideoPrompt,
501
+ showPermitOthersVideoPrompt,
241
502
  inviteLink,
242
- mobileView,
243
503
  onFetchAvatarPersonaData,
244
504
  onFetchParticipantMenuItemsForCallComposite,
245
505
  setDrawerMenuItems,
506
+ mobileView,
246
507
  setParticipantActioned,
247
508
  sidePaneHeaderMenuProps,
248
509
  pinnedParticipants,
249
510
  role,
250
511
  alternateCallerId,
251
- showMuteAllPrompt,
252
- setShowMuteAllPrompt,
253
- muteAllPromptLabels,
254
- onMuteAllPromptConfirm
512
+ onMuteAllPromptConfirm,
513
+ onForbidAllAttendeesPromptConfirm,
514
+ onPermitAllAttendeesPromptConfirm,
515
+ onForbidOthersVideoPromptConfirm,
516
+ onPermitOthersVideoPromptConfirm
255
517
  ]);
256
518
  const sidePaneRenderer = useMemo(() => ({
257
519
  headerRenderer: onRenderHeader,
@@ -1 +1 @@
1
- {"version":3,"file":"usePeoplePane.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,SAAS,EAAE,OAAO,EA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AAW,CAAC,GAAG,EAAE;QAChC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IAC3C,CAAC,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAE/C,MAAM,MAAM,GAAG,2BAA2B,CAAC,mBAAmB,CAAC,CAAC;IAEhE,kEAAkE;IAClE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,EAAE,CAAC;YACX,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvB,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC;AAC5F,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { RefObject, useCallback, useEffect, useMemo } from 'react';\nimport { SidePaneRenderer, useIsParticularSidePaneOpen } from './SidePaneProvider';\nimport { SidePaneHeader } from '../../../common/SidePaneHeader';\nimport { PeoplePaneContent } from '../../../common/PeoplePaneContent';\nimport { useLocale } from '../../../localization';\nimport { ParticipantMenuItemsCallback, _DrawerMenuItemProps } from '@internal/react-components';\nimport { AvatarPersonaDataCallback } from '../../../common/AvatarPersona';\nimport { IButton, IContextualMenuProps, IContextualMenuItem } from '@fluentui/react';\nimport { useSelector } from '../../hooks/useSelector';\nimport { getAlternateCallerId, getRemoteParticipants, getRole } from '../../selectors/baseSelectors';\nimport { Prompt } from '../Prompt';\n\nconst PEOPLE_SIDE_PANE_ID = 'people';\n\n/** @private */\nexport const usePeoplePane = (props: {\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n setDrawerMenuItems: (items: _DrawerMenuItemProps[]) => void;\n inviteLink?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n mobileView?: boolean;\n peopleButtonRef?: RefObject<IButton>;\n setParticipantActioned?: (userId: string) => void;\n spotlightedParticipantUserIds?: string[];\n onStartLocalSpotlight?: () => Promise<void>;\n onStopLocalSpotlight?: () => Promise<void>;\n onStartRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n onStopRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n onStopAllSpotlight?: () => Promise<void>;\n maxParticipantsToSpotlight?: number;\n onMuteParticipant?: (userId: string) => Promise<void>;\n onMuteAllRemoteParticipants?: () => Promise<void>;\n pinnedParticipants?: string[];\n onPinParticipant?: (userId: string) => void;\n onUnpinParticipant?: (userId: string) => void;\n disablePinMenuItem?: boolean;\n}): {\n openPeoplePane: () => void;\n closePeoplePane: () => void;\n isPeoplePaneOpen: boolean;\n} => {\n const {\n updateSidePaneRenderer,\n inviteLink,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n setDrawerMenuItems,\n mobileView,\n peopleButtonRef,\n setParticipantActioned,\n spotlightedParticipantUserIds,\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n onStopAllSpotlight,\n maxParticipantsToSpotlight,\n onMuteParticipant,\n pinnedParticipants,\n onPinParticipant,\n onUnpinParticipant,\n disablePinMenuItem,\n onMuteAllRemoteParticipants\n } = props;\n\n const closePane = useCallback(() => {\n updateSidePaneRenderer(undefined);\n peopleButtonRef?.current?.focus();\n }, [peopleButtonRef, updateSidePaneRenderer]);\n\n const localeStrings = useLocale().strings.call;\n const remoteParticipants = useSelector(getRemoteParticipants);\n const [showMuteAllPrompt, setShowMuteAllPrompt] = React.useState(false);\n const muteAllPromptLabels = useMemo(\n () => ({\n confirmButtonLabel: localeStrings.muteAllConfirmButtonLabel,\n heading: localeStrings.muteAllDialogTitle,\n text: localeStrings.muteAllDialogContent,\n cancelButtonLabel: localeStrings.muteAllCancelButtonLabel\n }),\n [\n localeStrings.muteAllConfirmButtonLabel,\n localeStrings.muteAllDialogTitle,\n localeStrings.muteAllDialogContent,\n localeStrings.muteAllCancelButtonLabel\n ]\n );\n\n const onMuteAllPromptConfirm = useCallback(() => {\n onMuteAllRemoteParticipants && onMuteAllRemoteParticipants();\n setShowMuteAllPrompt(false);\n }, [onMuteAllRemoteParticipants, setShowMuteAllPrompt]);\n\n const sidePaneHeaderMenuProps: IContextualMenuProps = useMemo(() => {\n const menuItems: IContextualMenuItem[] = [];\n if (onMuteAllRemoteParticipants && remoteParticipants) {\n let isAllMuted = true;\n if (remoteParticipants) {\n for (const participant of Object.values(remoteParticipants)) {\n if (!participant.isMuted) {\n isAllMuted = false;\n break;\n }\n }\n }\n menuItems.push({\n ['data-ui-id']: 'people-pane-mute-all-remote-participants',\n key: 'muteAllRemoteParticipants',\n text: localeStrings.muteAllMenuLabel,\n iconProps: {\n iconName: 'ContextualMenuMicMutedIcon',\n styles: { root: { lineHeight: 0 } }\n },\n onClick: () => {\n setShowMuteAllPrompt(true);\n },\n ariaLabel: localeStrings.muteAllMenuLabel,\n disabled: isAllMuted\n });\n }\n if (onStopAllSpotlight && spotlightedParticipantUserIds && spotlightedParticipantUserIds.length > 0) {\n menuItems.push({\n key: 'stopAllSpotlightKey',\n text: localeStrings.stopAllSpotlightMenuLabel,\n iconProps: { iconName: 'StopAllSpotlightMenuButton', styles: { root: { lineHeight: 0 } } },\n onClick: () => {\n onStopAllSpotlight();\n },\n ariaLabel: localeStrings.stopAllSpotlightMenuLabel\n });\n }\n return {\n items: menuItems\n };\n }, [\n onStopAllSpotlight,\n spotlightedParticipantUserIds,\n localeStrings.stopAllSpotlightMenuLabel,\n localeStrings.muteAllMenuLabel,\n onMuteAllRemoteParticipants,\n setShowMuteAllPrompt,\n remoteParticipants\n ]);\n\n const onRenderHeader = useCallback(\n () => (\n <SidePaneHeader\n onClose={closePane}\n headingText={localeStrings.peoplePaneTitle}\n dismissSidePaneButtonAriaLabel={localeStrings.dismissSidePaneButtonLabel}\n mobileView={mobileView ?? false}\n />\n ),\n [mobileView, closePane, localeStrings]\n );\n\n const onFetchParticipantMenuItemsForCallComposite = useCallback(\n (participantId: string, myUserId?: string, defaultMenuItems?: IContextualMenuItem[]): IContextualMenuItem[] => {\n let isPinned = pinnedParticipants?.includes(participantId);\n const _defaultMenuItems: IContextualMenuItem[] = [];\n const isSpotlighted = spotlightedParticipantUserIds?.includes(participantId);\n const isMe = myUserId === participantId;\n isPinned = isSpotlighted ? false : isPinned;\n if (onMuteParticipant && !isMe && remoteParticipants && remoteParticipants[participantId]) {\n const participant = remoteParticipants[participantId];\n const isMuted = !!participant?.isMuted;\n _defaultMenuItems.push({\n key: 'mute',\n text: 'Mute',\n iconProps: {\n iconName: 'ContextualMenuMicMutedIcon',\n styles: { root: { lineHeight: 0 } }\n },\n onClick: () => {\n onMuteParticipant(participantId);\n },\n 'data-ui-id': 'participant-item-mute-participant',\n ariaLabel: 'Mute',\n disabled: isMuted\n });\n }\n if (isSpotlighted) {\n const stopSpotlightMenuText = isMe\n ? localeStrings.stopSpotlightOnSelfMenuLabel\n : localeStrings.stopSpotlightMenuLabel;\n const onStopSpotlight = isMe\n ? onStopLocalSpotlight\n : onStopRemoteSpotlight\n ? () => {\n onStopRemoteSpotlight([participantId]);\n }\n : undefined;\n if (onStopSpotlight && stopSpotlightMenuText) {\n _defaultMenuItems.push({\n key: 'stop-spotlight',\n text: stopSpotlightMenuText,\n onClick: onStopSpotlight,\n iconProps: {\n iconName: 'StopSpotlightContextualMenuItem',\n styles: { root: { lineHeight: 0 } }\n },\n ariaLabel: stopSpotlightMenuText\n });\n }\n } else {\n const startSpotlightMenuText =\n spotlightedParticipantUserIds && spotlightedParticipantUserIds.length > 0\n ? localeStrings.addSpotlightMenuLabel\n : localeStrings.startSpotlightMenuLabel;\n const maxSpotlightedParticipantsReached = maxParticipantsToSpotlight\n ? spotlightedParticipantUserIds\n ? spotlightedParticipantUserIds.length >= maxParticipantsToSpotlight\n : false\n : false;\n const onStartSpotlight = isMe\n ? onStartLocalSpotlight\n : onStartRemoteSpotlight\n ? () => {\n onStartRemoteSpotlight([participantId]);\n }\n : undefined;\n if (onStartSpotlight && startSpotlightMenuText) {\n _defaultMenuItems.push({\n key: 'start-spotlight',\n text: startSpotlightMenuText,\n onClick: onStartSpotlight,\n iconProps: {\n iconName: 'StartSpotlightContextualMenuItem',\n styles: { root: { lineHeight: 0 } }\n },\n ariaLabel: startSpotlightMenuText,\n disabled: maxSpotlightedParticipantsReached,\n title: maxSpotlightedParticipantsReached ? localeStrings.spotlightLimitReachedMenuTitle : undefined\n });\n }\n }\n if (!isMe && isPinned !== undefined) {\n if (isPinned && onUnpinParticipant && localeStrings?.unpinParticipantMenuLabel) {\n _defaultMenuItems.push({\n key: 'unpin',\n text: localeStrings?.unpinParticipantMenuLabel,\n iconProps: {\n iconName: 'UnpinParticipant',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => {\n onUnpinParticipant?.(participantId);\n },\n 'data-ui-id': 'participant-item-unpin-participant-button',\n ariaLabel: localeStrings.unpinParticipantMenuItemAriaLabel\n });\n }\n if (!isPinned && onPinParticipant && localeStrings?.pinParticipantMenuLabel) {\n _defaultMenuItems.push({\n key: 'pin',\n text: disablePinMenuItem\n ? localeStrings.pinParticipantLimitReachedMenuLabel\n : localeStrings.pinParticipantMenuLabel,\n iconProps: {\n iconName: 'PinParticipant',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => {\n onPinParticipant(participantId);\n },\n 'data-ui-id': 'participant-item-pin-participant-button',\n disabled: disablePinMenuItem || isSpotlighted,\n ariaLabel: localeStrings.pinParticipantMenuItemAriaLabel\n });\n }\n }\n if (defaultMenuItems) {\n _defaultMenuItems.push(...defaultMenuItems);\n }\n return onFetchParticipantMenuItems\n ? onFetchParticipantMenuItems(participantId, myUserId, _defaultMenuItems)\n : _defaultMenuItems;\n },\n [\n spotlightedParticipantUserIds,\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n onFetchParticipantMenuItems,\n onMuteParticipant,\n remoteParticipants,\n localeStrings.stopSpotlightMenuLabel,\n localeStrings.stopSpotlightOnSelfMenuLabel,\n localeStrings.addSpotlightMenuLabel,\n localeStrings.startSpotlightMenuLabel,\n localeStrings.spotlightLimitReachedMenuTitle,\n maxParticipantsToSpotlight,\n pinnedParticipants,\n onPinParticipant,\n onUnpinParticipant,\n disablePinMenuItem,\n localeStrings.pinParticipantMenuLabel,\n localeStrings.pinParticipantLimitReachedMenuLabel,\n localeStrings.unpinParticipantMenuLabel,\n localeStrings.unpinParticipantMenuItemAriaLabel,\n localeStrings.pinParticipantMenuItemAriaLabel\n ]\n );\n\n const role = useSelector(getRole);\n const alternateCallerId = useSelector(getAlternateCallerId);\n\n const onRenderContent = useCallback((): JSX.Element => {\n return (\n <>\n {\n <Prompt\n {...muteAllPromptLabels}\n styles={{ main: { minWidth: '22.5rem', padding: '1.5rem' } }}\n onConfirm={() => onMuteAllPromptConfirm()}\n isOpen={showMuteAllPrompt}\n onCancel={() => setShowMuteAllPrompt(false)}\n />\n }\n <PeoplePaneContent\n inviteLink={inviteLink}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={onFetchParticipantMenuItemsForCallComposite}\n setDrawerMenuItems={setDrawerMenuItems}\n mobileView={mobileView}\n setParticipantActioned={setParticipantActioned}\n participantListHeadingMoreButtonProps={sidePaneHeaderMenuProps}\n pinnedParticipants={pinnedParticipants}\n role={role}\n alternateCallerId={alternateCallerId}\n />\n </>\n );\n }, [\n inviteLink,\n mobileView,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItemsForCallComposite,\n setDrawerMenuItems,\n setParticipantActioned,\n sidePaneHeaderMenuProps,\n pinnedParticipants,\n role,\n alternateCallerId,\n showMuteAllPrompt,\n setShowMuteAllPrompt,\n muteAllPromptLabels,\n onMuteAllPromptConfirm\n ]);\n\n const sidePaneRenderer: SidePaneRenderer = useMemo(\n () => ({\n headerRenderer: onRenderHeader,\n contentRenderer: onRenderContent,\n id: PEOPLE_SIDE_PANE_ID\n }),\n [onRenderContent, onRenderHeader]\n );\n\n const openPane = useCallback(() => {\n updateSidePaneRenderer(sidePaneRenderer);\n }, [sidePaneRenderer, updateSidePaneRenderer]);\n\n const isOpen = useIsParticularSidePaneOpen(PEOPLE_SIDE_PANE_ID);\n\n // Update pane renderer if it is open and the openPane dep changes\n useEffect(() => {\n if (isOpen) {\n openPane();\n }\n }, [isOpen, openPane]);\n\n return { openPeoplePane: openPane, closePeoplePane: closePane, isPeoplePaneOpen: isOpen };\n};\n"]}
1
+ {"version":3,"file":"usePeoplePane.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAa,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpF,OAAO,EAAoB,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIlD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACrG,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAInC,MAAM,mBAAmB,GAAG,QAAQ,CAAC;AAErC,eAAe;AACf,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAwC7B,EAIC,EAAE;IACF,MAAM,EACJ,sBAAsB,EACtB,UAAU,EACV,wBAAwB,EACxB,2BAA2B,EAC3B,kBAAkB,EAClB,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,6BAA6B,EAC7B,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B;QACxB,2CAA2C;QAC3C,kBAAkB;QAClB,UAAU;QACV,sBAAsB;QACtB,uBAAuB;QACvB,kBAAkB;QAClB,IAAI;QACJ,iBAAiB;QACjB,sBAAsB;QACtB,iCAAiC;QACjC,iCAAiC;QACjC,gCAAgC;QAChC,gCAAgC;KACjC,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAqB,OAAO,CAChD,GAAG,EAAE,CAAC,CAAC;QACL,cAAc,EAAE,cAAc;QAC9B,eAAe,EAAE,eAAe;QAChC,EAAE,EAAE,mBAAmB;KACxB,CAAC,EACF,CAAC,eAAe,EAAE,cAAc,CAAC,CAClC,CAAC;IAEF,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;IAC3C,CAAC,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAE/C,MAAM,MAAM,GAAG,2BAA2B,CAAC,mBAAmB,CAAC,CAAC;IAEhE,kEAAkE;IAClE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,MAAM,EAAE,CAAC;YACX,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEvB,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC;AAC5F,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { RefObject, useCallback, useEffect, useMemo, useState } from 'react';\nimport { SidePaneRenderer, useIsParticularSidePaneOpen } from './SidePaneProvider';\nimport { SidePaneHeader } from '../../../common/SidePaneHeader';\nimport { PeoplePaneContent } from '../../../common/PeoplePaneContent';\nimport { useLocale } from '../../../localization';\nimport { ParticipantMenuItemsCallback, _DrawerMenuItemProps } from '@internal/react-components';\nimport { AvatarPersonaDataCallback } from '../../../common/AvatarPersona';\nimport { IButton, IContextualMenuProps, IContextualMenuItem } from '@fluentui/react';\nimport { useSelector } from '../../hooks/useSelector';\nimport { getAlternateCallerId, getRemoteParticipants, getRole } from '../../selectors/baseSelectors';\nimport { Prompt } from '../Prompt';\n/* @conditional-compile-remove(media-access) */\nimport { MediaAccess } from '@internal/react-components';\n\nconst PEOPLE_SIDE_PANE_ID = 'people';\n\n/** @private */\nexport const usePeoplePane = (props: {\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n setDrawerMenuItems: (items: _DrawerMenuItemProps[]) => void;\n inviteLink?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n mobileView?: boolean;\n peopleButtonRef?: RefObject<IButton>;\n setParticipantActioned?: (userId: string) => void;\n spotlightedParticipantUserIds?: string[];\n onStartLocalSpotlight?: () => Promise<void>;\n onStopLocalSpotlight?: () => Promise<void>;\n onStartRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n onStopRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n onStopAllSpotlight?: () => Promise<void>;\n maxParticipantsToSpotlight?: number;\n onMuteParticipant?: (userId: string) => Promise<void>;\n onMuteAllRemoteParticipants?: () => Promise<void>;\n pinnedParticipants?: string[];\n onPinParticipant?: (userId: string) => void;\n onUnpinParticipant?: (userId: string) => void;\n disablePinMenuItem?: boolean;\n /* @conditional-compile-remove(media-access) */\n onForbidAudio?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n onPermitAudio?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n onForbidOthersAudio?: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n onPermitOthersAudio?: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n onForbidVideo?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n onPermitVideo?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n onForbidOthersVideo?: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n onPermitOthersVideo?: () => Promise<void>;\n /* @conditional-compile-remove(media-access) */\n meetingMediaAccess?: MediaAccess;\n}): {\n openPeoplePane: () => void;\n closePeoplePane: () => void;\n isPeoplePaneOpen: boolean;\n} => {\n const {\n updateSidePaneRenderer,\n inviteLink,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n setDrawerMenuItems,\n mobileView,\n peopleButtonRef,\n setParticipantActioned,\n spotlightedParticipantUserIds,\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n onStopAllSpotlight,\n maxParticipantsToSpotlight,\n onMuteParticipant,\n pinnedParticipants,\n onPinParticipant,\n onUnpinParticipant,\n disablePinMenuItem,\n onMuteAllRemoteParticipants,\n /* @conditional-compile-remove(media-access) */\n onForbidAudio,\n /* @conditional-compile-remove(media-access) */\n onPermitAudio,\n /* @conditional-compile-remove(media-access) */\n onForbidOthersAudio,\n /* @conditional-compile-remove(media-access) */\n onPermitOthersAudio,\n /* @conditional-compile-remove(media-access) */\n onForbidVideo,\n /* @conditional-compile-remove(media-access) */\n onPermitVideo,\n /* @conditional-compile-remove(media-access) */\n onForbidOthersVideo,\n /* @conditional-compile-remove(media-access) */\n onPermitOthersVideo,\n /* @conditional-compile-remove(media-access) */\n meetingMediaAccess\n } = props;\n\n const closePane = useCallback(() => {\n updateSidePaneRenderer(undefined);\n peopleButtonRef?.current?.focus();\n }, [peopleButtonRef, updateSidePaneRenderer]);\n\n const localeStrings = useLocale().strings.call;\n const remoteParticipants = useSelector(getRemoteParticipants);\n const [showMuteAllPrompt, setShowMuteAllPrompt] = useState(false);\n const muteAllPromptLabels = useMemo(\n () => ({\n confirmButtonLabel: localeStrings.muteAllConfirmButtonLabel,\n heading: localeStrings.muteAllDialogTitle,\n text: localeStrings.muteAllDialogContent,\n cancelButtonLabel: localeStrings.muteAllCancelButtonLabel\n }),\n [\n localeStrings.muteAllConfirmButtonLabel,\n localeStrings.muteAllDialogTitle,\n localeStrings.muteAllDialogContent,\n localeStrings.muteAllCancelButtonLabel\n ]\n );\n\n const onMuteAllPromptConfirm = useCallback(() => {\n onMuteAllRemoteParticipants && onMuteAllRemoteParticipants();\n setShowMuteAllPrompt(false);\n }, [onMuteAllRemoteParticipants, setShowMuteAllPrompt]);\n\n /* @conditional-compile-remove(media-access) */\n const [showForbidOthersAudioPrompt, setShowForbidOthersAudioPrompt] = useState(false);\n /* @conditional-compile-remove(media-access) */\n const [showPermitOthersAudioPrompt, setShowPermitOthersAudioPrompt] = useState(false);\n /* @conditional-compile-remove(media-access) */\n const [showForbidOthersVideoPrompt, setShowForbidOthersVideoPrompt] = useState(false);\n /* @conditional-compile-remove(media-access) */\n const [showPermitOthersVideoPrompt, setShowPermitOthersVideoPrompt] = useState(false);\n\n /* @conditional-compile-remove(media-access) */\n const onForbidAllAttendeesPromptConfirm = useCallback(() => {\n onForbidOthersAudio && onForbidOthersAudio();\n setShowForbidOthersAudioPrompt(false);\n }, [onForbidOthersAudio, setShowForbidOthersAudioPrompt]);\n /* @conditional-compile-remove(media-access) */\n const onPermitAllAttendeesPromptConfirm = useCallback(() => {\n onPermitOthersAudio && onPermitOthersAudio();\n setShowPermitOthersAudioPrompt(false);\n }, [onPermitOthersAudio, setShowPermitOthersAudioPrompt]);\n /* @conditional-compile-remove(media-access) */\n const onForbidOthersVideoPromptConfirm = useCallback(() => {\n onForbidOthersVideo && onForbidOthersVideo();\n setShowForbidOthersVideoPrompt(false);\n }, [onForbidOthersVideo, setShowForbidOthersVideoPrompt]);\n /* @conditional-compile-remove(media-access) */\n const onPermitOthersVideoPromptConfirm = useCallback(() => {\n onPermitOthersVideo && onPermitOthersVideo();\n setShowPermitOthersVideoPrompt(false);\n }, [onPermitOthersVideo, setShowPermitOthersVideoPrompt]);\n\n const sidePaneHeaderMenuProps: IContextualMenuProps = useMemo(() => {\n const menuItems: IContextualMenuItem[] = [];\n if (onMuteAllRemoteParticipants && remoteParticipants) {\n let isAllMuted = true;\n if (remoteParticipants) {\n for (const participant of Object.values(remoteParticipants)) {\n if (!participant.isMuted) {\n isAllMuted = false;\n break;\n }\n }\n }\n menuItems.push({\n ['data-ui-id']: 'people-pane-mute-all-remote-participants',\n key: 'muteAllRemoteParticipants',\n text: localeStrings.muteAllMenuLabel,\n iconProps: {\n iconName: 'ContextualMenuMicMutedIcon',\n styles: { root: { lineHeight: 0 } }\n },\n onClick: () => {\n setShowMuteAllPrompt(true);\n },\n ariaLabel: localeStrings.muteAllMenuLabel,\n disabled: isAllMuted\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n let hasAttendee = false;\n /* @conditional-compile-remove(media-access) */\n if (remoteParticipants) {\n for (const participant of Object.values(remoteParticipants)) {\n if (participant.role && participant.role === 'Attendee') {\n hasAttendee = true;\n break;\n }\n }\n }\n /* @conditional-compile-remove(media-access) */\n const isMeetingAudioPermitted = meetingMediaAccess ? meetingMediaAccess.isAudioPermitted : true;\n /* @conditional-compile-remove(media-access) */\n const isMeetingVideoPermitted = meetingMediaAccess ? meetingMediaAccess.isVideoPermitted : true;\n /* @conditional-compile-remove(media-access) */\n if (onForbidOthersAudio && remoteParticipants) {\n hasAttendee &&\n isMeetingAudioPermitted &&\n menuItems.push({\n ['data-ui-id']: 'people-pane-forbid-all-attendees-audio',\n key: 'forbidOthersAudio',\n text: localeStrings.forbidOthersAudioMenuLabel,\n iconProps: {\n iconName: 'ControlButtonMicProhibited',\n styles: { root: { lineHeight: 0 } }\n },\n onClick: () => {\n setShowForbidOthersAudioPrompt(true);\n },\n ariaLabel: localeStrings.forbidOthersAudioMenuLabel,\n disabled: !hasAttendee\n });\n }\n /* @conditional-compile-remove(media-access) */\n if (onPermitOthersAudio && remoteParticipants) {\n hasAttendee &&\n !isMeetingAudioPermitted &&\n menuItems.push({\n ['data-ui-id']: 'people-pane-permit-all-attendees-audio',\n key: 'permitOthersAudio',\n text: localeStrings.permitOthersAudioMenuLabel,\n iconProps: {\n iconName: 'ControlButtonMicOn',\n styles: { root: { lineHeight: 0 } }\n },\n onClick: () => {\n setShowPermitOthersAudioPrompt(true);\n },\n ariaLabel: localeStrings.permitOthersAudioMenuLabel,\n disabled: !hasAttendee\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n if (onForbidOthersVideo && remoteParticipants) {\n hasAttendee &&\n isMeetingVideoPermitted &&\n menuItems.push({\n ['data-ui-id']: 'people-pane-forbid-all-attendees-video',\n key: 'forbidOthersVideo',\n text: localeStrings.forbidOthersVideoMenuLabel,\n iconProps: {\n iconName: 'ControlButtonCameraProhibitedSmall',\n styles: { root: { lineHeight: 0 } }\n },\n onClick: () => {\n setShowForbidOthersVideoPrompt(true);\n },\n ariaLabel: localeStrings.forbidOthersVideoMenuLabel,\n disabled: !hasAttendee\n });\n }\n /* @conditional-compile-remove(media-access) */\n if (onPermitOthersVideo && remoteParticipants) {\n hasAttendee &&\n !isMeetingVideoPermitted &&\n menuItems.push({\n ['data-ui-id']: 'people-pane-permit-all-attendees-video',\n key: 'permitOthersVideo',\n text: localeStrings.permitOthersVideoMenuLabel,\n iconProps: {\n iconName: 'ControlButtonCameraOn',\n styles: { root: { lineHeight: 0 } }\n },\n onClick: () => {\n setShowPermitOthersVideoPrompt(true);\n },\n ariaLabel: localeStrings.permitOthersVideoMenuLabel,\n disabled: !hasAttendee\n });\n }\n\n if (onStopAllSpotlight && spotlightedParticipantUserIds && spotlightedParticipantUserIds.length > 0) {\n menuItems.push({\n key: 'stopAllSpotlightKey',\n text: localeStrings.stopAllSpotlightMenuLabel,\n iconProps: { iconName: 'StopAllSpotlightMenuButton', styles: { root: { lineHeight: 0 } } },\n onClick: () => {\n onStopAllSpotlight();\n },\n ariaLabel: localeStrings.stopAllSpotlightMenuLabel\n });\n }\n return {\n items: menuItems\n };\n }, [\n onMuteAllRemoteParticipants,\n remoteParticipants,\n /* @conditional-compile-remove(media-access) */\n meetingMediaAccess,\n /* @conditional-compile-remove(media-access) */\n onForbidOthersAudio,\n /* @conditional-compile-remove(media-access) */\n onPermitOthersAudio,\n /* @conditional-compile-remove(media-access) */\n onForbidOthersVideo,\n /* @conditional-compile-remove(media-access) */\n onPermitOthersVideo,\n onStopAllSpotlight,\n spotlightedParticipantUserIds,\n localeStrings.muteAllMenuLabel,\n localeStrings.forbidOthersAudioMenuLabel,\n localeStrings.permitOthersAudioMenuLabel,\n localeStrings.forbidOthersVideoMenuLabel,\n localeStrings.permitOthersVideoMenuLabel,\n localeStrings.stopAllSpotlightMenuLabel\n ]);\n\n const onRenderHeader = useCallback(\n () => (\n <SidePaneHeader\n onClose={closePane}\n headingText={localeStrings.peoplePaneTitle}\n dismissSidePaneButtonAriaLabel={localeStrings.dismissSidePaneButtonLabel}\n mobileView={mobileView ?? false}\n />\n ),\n [mobileView, closePane, localeStrings]\n );\n\n const onFetchParticipantMenuItemsForCallComposite = useCallback(\n (participantId: string, myUserId?: string, defaultMenuItems?: IContextualMenuItem[]): IContextualMenuItem[] => {\n let isPinned = pinnedParticipants?.includes(participantId);\n const _defaultMenuItems: IContextualMenuItem[] = [];\n const isSpotlighted = spotlightedParticipantUserIds?.includes(participantId);\n const isMe = myUserId === participantId;\n isPinned = isSpotlighted ? false : isPinned;\n if (onMuteParticipant && !isMe && remoteParticipants && remoteParticipants[participantId]) {\n const participant = remoteParticipants[participantId];\n const isMuted = !!participant?.isMuted;\n _defaultMenuItems.push({\n key: 'mute',\n text: 'Mute',\n iconProps: {\n iconName: 'ContextualMenuMicMutedIcon',\n styles: { root: { lineHeight: 0 } }\n },\n onClick: () => {\n onMuteParticipant(participantId);\n },\n 'data-ui-id': 'participant-item-mute-participant',\n ariaLabel: 'Mute',\n disabled: isMuted\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n const remoteParticipant = remoteParticipants?.[participantId];\n /* @conditional-compile-remove(media-access) */\n if (\n remoteParticipant?.mediaAccess &&\n !remoteParticipant.mediaAccess.isAudioPermitted &&\n remoteParticipant?.role === 'Attendee' &&\n onPermitAudio\n ) {\n _defaultMenuItems.push({\n key: 'permit-audio',\n text: localeStrings.permitAudioMenuLabel,\n iconProps: {\n iconName: 'ControlButtonMicOn',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => {\n onPermitAudio([participantId]);\n },\n 'data-ui-id': 'participant-item-permit-microphone-button',\n ariaLabel: localeStrings.permitAudioMenuLabel\n });\n }\n /* @conditional-compile-remove(media-access) */\n if (remoteParticipant?.mediaAccess?.isAudioPermitted && remoteParticipant?.role === 'Attendee' && onForbidAudio) {\n _defaultMenuItems.push({\n key: 'forbid-audio',\n text: localeStrings.forbidAudioMenuLabel,\n iconProps: {\n iconName: 'ControlButtonMicProhibited',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => {\n onForbidAudio([participantId]);\n },\n 'data-ui-id': 'participant-item-forbid-microphone-button',\n ariaLabel: localeStrings.forbidAudioMenuLabel\n });\n }\n /* @conditional-compile-remove(media-access) */\n if (\n remoteParticipant?.mediaAccess &&\n !remoteParticipant.mediaAccess.isVideoPermitted &&\n remoteParticipant?.role === 'Attendee' &&\n onPermitVideo\n ) {\n _defaultMenuItems.push({\n key: 'permit-video',\n text: localeStrings.permitVideoMenuLabel,\n iconProps: {\n iconName: 'ControlButtonCameraOn',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => {\n onPermitVideo([participantId]);\n },\n 'data-ui-id': 'participant-item-permit-camera-button',\n ariaLabel: localeStrings.permitVideoMenuLabel\n });\n }\n /* @conditional-compile-remove(media-access) */\n if (remoteParticipant?.mediaAccess?.isVideoPermitted && remoteParticipant?.role === 'Attendee' && onForbidVideo) {\n _defaultMenuItems.push({\n key: 'forbid-video',\n text: localeStrings.forbidVideoMenuLabel,\n iconProps: {\n iconName: 'ControlButtonCameraProhibitedSmall',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => {\n onForbidVideo([participantId]);\n },\n 'data-ui-id': 'participant-item-forbid-camera-button',\n ariaLabel: localeStrings.forbidVideoMenuLabel\n });\n }\n\n if (isSpotlighted) {\n const stopSpotlightMenuText = isMe\n ? localeStrings.stopSpotlightOnSelfMenuLabel\n : localeStrings.stopSpotlightMenuLabel;\n const onStopSpotlight = isMe\n ? onStopLocalSpotlight\n : onStopRemoteSpotlight\n ? () => {\n onStopRemoteSpotlight([participantId]);\n }\n : undefined;\n if (onStopSpotlight && stopSpotlightMenuText) {\n _defaultMenuItems.push({\n key: 'stop-spotlight',\n text: stopSpotlightMenuText,\n onClick: onStopSpotlight,\n iconProps: {\n iconName: 'StopSpotlightContextualMenuItem',\n styles: { root: { lineHeight: 0 } }\n },\n ariaLabel: stopSpotlightMenuText\n });\n }\n } else {\n const startSpotlightMenuText =\n spotlightedParticipantUserIds && spotlightedParticipantUserIds.length > 0\n ? localeStrings.addSpotlightMenuLabel\n : localeStrings.startSpotlightMenuLabel;\n const maxSpotlightedParticipantsReached = maxParticipantsToSpotlight\n ? spotlightedParticipantUserIds\n ? spotlightedParticipantUserIds.length >= maxParticipantsToSpotlight\n : false\n : false;\n const onStartSpotlight = isMe\n ? onStartLocalSpotlight\n : onStartRemoteSpotlight\n ? () => {\n onStartRemoteSpotlight([participantId]);\n }\n : undefined;\n if (onStartSpotlight && startSpotlightMenuText) {\n _defaultMenuItems.push({\n key: 'start-spotlight',\n text: startSpotlightMenuText,\n onClick: onStartSpotlight,\n iconProps: {\n iconName: 'StartSpotlightContextualMenuItem',\n styles: { root: { lineHeight: 0 } }\n },\n ariaLabel: startSpotlightMenuText,\n disabled: maxSpotlightedParticipantsReached,\n title: maxSpotlightedParticipantsReached ? localeStrings.spotlightLimitReachedMenuTitle : undefined\n });\n }\n }\n if (!isMe && isPinned !== undefined) {\n if (isPinned && onUnpinParticipant && localeStrings?.unpinParticipantMenuLabel) {\n _defaultMenuItems.push({\n key: 'unpin',\n text: localeStrings?.unpinParticipantMenuLabel,\n iconProps: {\n iconName: 'UnpinParticipant',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => {\n onUnpinParticipant?.(participantId);\n },\n 'data-ui-id': 'participant-item-unpin-participant-button',\n ariaLabel: localeStrings.unpinParticipantMenuItemAriaLabel\n });\n }\n if (!isPinned && onPinParticipant && localeStrings?.pinParticipantMenuLabel) {\n _defaultMenuItems.push({\n key: 'pin',\n text: disablePinMenuItem\n ? localeStrings.pinParticipantLimitReachedMenuLabel\n : localeStrings.pinParticipantMenuLabel,\n iconProps: {\n iconName: 'PinParticipant',\n styles: { root: { lineHeight: '1rem', textAlign: 'center' } }\n },\n onClick: () => {\n onPinParticipant(participantId);\n },\n 'data-ui-id': 'participant-item-pin-participant-button',\n disabled: disablePinMenuItem || isSpotlighted,\n ariaLabel: localeStrings.pinParticipantMenuItemAriaLabel\n });\n }\n }\n if (defaultMenuItems) {\n _defaultMenuItems.push(...defaultMenuItems);\n }\n return onFetchParticipantMenuItems\n ? onFetchParticipantMenuItems(participantId, myUserId, _defaultMenuItems)\n : _defaultMenuItems;\n },\n [\n pinnedParticipants,\n spotlightedParticipantUserIds,\n onMuteParticipant,\n remoteParticipants,\n onPermitAudio,\n onForbidAudio,\n onPermitVideo,\n onForbidVideo,\n onFetchParticipantMenuItems,\n localeStrings.permitAudioMenuLabel,\n localeStrings.forbidAudioMenuLabel,\n localeStrings.permitVideoMenuLabel,\n localeStrings.forbidVideoMenuLabel,\n localeStrings.stopSpotlightOnSelfMenuLabel,\n localeStrings.stopSpotlightMenuLabel,\n localeStrings.addSpotlightMenuLabel,\n localeStrings.startSpotlightMenuLabel,\n localeStrings.spotlightLimitReachedMenuTitle,\n localeStrings?.unpinParticipantMenuLabel,\n localeStrings.pinParticipantMenuLabel,\n localeStrings.unpinParticipantMenuItemAriaLabel,\n localeStrings.pinParticipantLimitReachedMenuLabel,\n localeStrings.pinParticipantMenuItemAriaLabel,\n onStopLocalSpotlight,\n onStopRemoteSpotlight,\n maxParticipantsToSpotlight,\n onStartLocalSpotlight,\n onStartRemoteSpotlight,\n onUnpinParticipant,\n onPinParticipant,\n disablePinMenuItem\n ]\n );\n\n const role = useSelector(getRole);\n const alternateCallerId = useSelector(getAlternateCallerId);\n\n const onRenderContent = useCallback((): JSX.Element => {\n return (\n <>\n {\n <Prompt\n {...muteAllPromptLabels}\n styles={{ main: { minWidth: '22.5rem', padding: '1.5rem' } }}\n onConfirm={() => onMuteAllPromptConfirm()}\n isOpen={showMuteAllPrompt}\n onCancel={() => setShowMuteAllPrompt(false)}\n />\n }\n {\n /* @conditional-compile-remove(media-access) */\n <Prompt\n heading={localeStrings.forbidOthersAudioDialogTitle}\n text={localeStrings.forbidOthersAudioDialogContent}\n confirmButtonLabel={localeStrings.forbidOthersAudioConfirmButtonLabel}\n cancelButtonLabel={localeStrings.forbidOthersAudioCancelButtonLabel}\n styles={{ main: { minWidth: '22.5rem', padding: '1.5rem' } }}\n onConfirm={() => onForbidAllAttendeesPromptConfirm()}\n isOpen={showForbidOthersAudioPrompt}\n onCancel={() => setShowForbidOthersAudioPrompt(false)}\n />\n }\n {\n /* @conditional-compile-remove(media-access) */\n <Prompt\n heading={localeStrings.permitOthersAudioDialogTitle}\n text={localeStrings.permitOthersAudioDialogContent}\n confirmButtonLabel={localeStrings.permitOthersAudioConfirmButtonLabel}\n cancelButtonLabel={localeStrings.permitOthersAudioCancelButtonLabel}\n styles={{ main: { minWidth: '22.5rem', padding: '1.5rem' } }}\n onConfirm={() => onPermitAllAttendeesPromptConfirm()}\n isOpen={showPermitOthersAudioPrompt}\n onCancel={() => setShowForbidOthersAudioPrompt(false)}\n />\n }\n {\n /* @conditional-compile-remove(media-access) */\n <Prompt\n heading={localeStrings.forbidOthersVideoDialogTitle}\n text={localeStrings.forbidOthersVideoDialogContent}\n confirmButtonLabel={localeStrings.forbidOthersVideoConfirmButtonLabel}\n cancelButtonLabel={localeStrings.forbidOthersVideoCancelButtonLabel}\n styles={{ main: { minWidth: '22.5rem', padding: '1.5rem' } }}\n onConfirm={() => onForbidOthersVideoPromptConfirm()}\n isOpen={showForbidOthersVideoPrompt}\n onCancel={() => setShowForbidOthersVideoPrompt(false)}\n />\n }\n {\n /* @conditional-compile-remove(media-access) */\n <Prompt\n heading={localeStrings.permitOthersVideoDialogTitle}\n text={localeStrings.permitOthersVideoDialogContent}\n confirmButtonLabel={localeStrings.permitOthersVideoConfirmButtonLabel}\n cancelButtonLabel={localeStrings.permitOthersVideoCancelButtonLabel}\n styles={{ main: { minWidth: '22.5rem', padding: '1.5rem' } }}\n onConfirm={() => onPermitOthersVideoPromptConfirm()}\n isOpen={showPermitOthersVideoPrompt}\n onCancel={() => setShowForbidOthersVideoPrompt(false)}\n />\n }\n\n <PeoplePaneContent\n inviteLink={inviteLink}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={onFetchParticipantMenuItemsForCallComposite}\n setDrawerMenuItems={setDrawerMenuItems}\n mobileView={mobileView}\n setParticipantActioned={setParticipantActioned}\n participantListHeadingMoreButtonProps={sidePaneHeaderMenuProps}\n pinnedParticipants={pinnedParticipants}\n role={role}\n alternateCallerId={alternateCallerId}\n />\n </>\n );\n }, [\n muteAllPromptLabels,\n showMuteAllPrompt,\n localeStrings.forbidOthersAudioDialogTitle,\n localeStrings.forbidOthersAudioDialogContent,\n localeStrings.forbidOthersAudioConfirmButtonLabel,\n localeStrings.forbidOthersAudioCancelButtonLabel,\n localeStrings.permitOthersAudioDialogTitle,\n localeStrings.permitOthersAudioDialogContent,\n localeStrings.permitOthersAudioConfirmButtonLabel,\n localeStrings.permitOthersAudioCancelButtonLabel,\n localeStrings.forbidOthersVideoDialogTitle,\n localeStrings.forbidOthersVideoDialogContent,\n localeStrings.forbidOthersVideoConfirmButtonLabel,\n localeStrings.forbidOthersVideoCancelButtonLabel,\n localeStrings.permitOthersVideoDialogTitle,\n localeStrings.permitOthersVideoDialogContent,\n localeStrings.permitOthersVideoConfirmButtonLabel,\n localeStrings.permitOthersVideoCancelButtonLabel,\n showForbidOthersAudioPrompt,\n showPermitOthersAudioPrompt,\n showForbidOthersVideoPrompt,\n showPermitOthersVideoPrompt,\n inviteLink,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItemsForCallComposite,\n setDrawerMenuItems,\n mobileView,\n setParticipantActioned,\n sidePaneHeaderMenuProps,\n pinnedParticipants,\n role,\n alternateCallerId,\n onMuteAllPromptConfirm,\n onForbidAllAttendeesPromptConfirm,\n onPermitAllAttendeesPromptConfirm,\n onForbidOthersVideoPromptConfirm,\n onPermitOthersVideoPromptConfirm\n ]);\n\n const sidePaneRenderer: SidePaneRenderer = useMemo(\n () => ({\n headerRenderer: onRenderHeader,\n contentRenderer: onRenderContent,\n id: PEOPLE_SIDE_PANE_ID\n }),\n [onRenderContent, onRenderHeader]\n );\n\n const openPane = useCallback(() => {\n updateSidePaneRenderer(sidePaneRenderer);\n }, [sidePaneRenderer, updateSidePaneRenderer]);\n\n const isOpen = useIsParticularSidePaneOpen(PEOPLE_SIDE_PANE_ID);\n\n // Update pane renderer if it is open and the openPane dep changes\n useEffect(() => {\n if (isOpen) {\n openPane();\n }\n }, [isOpen, openPane]);\n\n return { openPeoplePane: openPane, closePeoplePane: closePane, isPeoplePaneOpen: isOpen };\n};\n"]}
@@ -58,7 +58,7 @@ const memoizeState = memoizeOne((userId, deviceManager, calls, latestErrors, lat
58
58
  callAgent: { displayName },
59
59
  calls,
60
60
  latestErrors,
61
- /* @conditional-compile-remove(breakout-rooms) */
61
+ /* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */
62
62
  latestNotifications: latestNotifications !== null && latestNotifications !== void 0 ? latestNotifications : {},
63
63
  alternateCallerId,
64
64
  environmentInfo
@@ -1 +1 @@
1
- {"version":3,"file":"useAdaptedSelector.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,uDAAuD;AAEvD,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CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAEvH,MAAM,mBAAmB,GAAG,CAAC,cAAgC,EAAmB,EAAE;IAChF,OAAO,YAAY,CACjB,cAAc,CAAC,MAAM,EACrB,cAAc,CAAC,OAAO,EACtB,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC;IACjC,oCAAoC;IACpC,uFAAuF;IACvF,EAAE;IACF,oEAAoE;IACpE,6FAA6F;IAC7F,sEAAsE;IACtE,qGAAqG;IACrG,mEAAmE;IACnE,EAAE;IACF,6GAA6G;IAC7G,yGAAyG;IACzG,mGAAmG;IACnG,0GAA0G;IAC1G,cAAc,CAAC,YAA0B,EACzC,SAAS;QACP,iDAAiD,CAAE,cAAc,CAAC,mBAAyC,EAC7G,cAAc,CAAC,WAAW,EAC1B,cAAc,CAAC,iBAAiB,EAChC,cAAc,CAAC,eAAe,CAC/B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { useState, useEffect, useRef, useMemo } from 'react';\n\nimport memoizeOne from 'memoize-one';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallAdapterState } from '../adapter/CallAdapter';\nimport { CallErrors, CallState, CallClientState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { CallNotifications } from '@internal/calling-stateful-client';\n/**\n * @private\n */\nexport const useAdaptedSelector = <SelectorT extends (state: CallClientState, props: any) => any>(\n selector: SelectorT,\n selectorProps?: Parameters<SelectorT>[1]\n): ReturnType<SelectorT> => {\n return useSelectorWithAdaptation(selector, adaptCompositeState, selectorProps);\n};\n\n/**\n * @private\n */\nexport const useSelectorWithAdaptation = <\n SelectorT extends (state: ReturnType<AdaptFuncT>, props: any) => any,\n AdaptFuncT extends (state: CallAdapterState) => any\n>(\n selector: SelectorT,\n adaptState: AdaptFuncT,\n selectorProps?: Parameters<SelectorT>[1]\n): ReturnType<SelectorT> => {\n const adapter = useAdapter();\n\n // Keeps track of whether the current component is mounted or not. If it has unmounted, make sure we do not modify the\n // state or it will cause React warnings in the console. https://skype.visualstudio.com/SPOOL/_workitems/edit/2453212\n const mounted = useRef(false);\n\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n });\n\n const callId = adapter.getState().call?.id;\n const callConfigProps = useMemo(\n () => ({\n callId\n }),\n [callId]\n );\n\n const [props, setProps] = useState(selector(adaptState(adapter.getState()), selectorProps ?? callConfigProps));\n const propRef = useRef(props);\n propRef.current = props;\n\n useEffect(() => {\n const onStateChange = (state: CallAdapterState): void => {\n if (!mounted.current) {\n return;\n }\n const newProps = selector(adaptState(state), selectorProps ?? callConfigProps);\n if (propRef.current !== newProps) {\n setProps(newProps);\n }\n };\n adapter.onStateChange(onStateChange);\n return () => {\n adapter.offStateChange(onStateChange);\n };\n }, [adaptState, adapter, selector, selectorProps, callConfigProps]);\n return props;\n};\n\nconst memoizeState = memoizeOne(\n (\n userId: CommunicationIdentifierKind,\n deviceManager: DeviceManagerState,\n calls: { [key: string]: CallState },\n latestErrors: CallErrors,\n latestNotifications?: undefined | /* @conditional-compile-remove(breakout-rooms) */ CallNotifications,\n displayName?: string,\n alternateCallerId?: string,\n environmentInfo?: undefined | EnvironmentInfo\n ): CallClientState => ({\n userId,\n incomingCalls: {},\n incomingCallsEnded: {},\n callsEnded: {},\n deviceManager,\n callAgent: { displayName },\n calls,\n latestErrors,\n /* @conditional-compile-remove(breakout-rooms) */\n latestNotifications: latestNotifications ?? ({} as CallNotifications),\n alternateCallerId,\n environmentInfo\n })\n);\n\nconst memoizeCalls = memoizeOne((call?: CallState): { [key: string]: CallState } => (call ? { [call.id]: call } : {}));\n\nconst adaptCompositeState = (compositeState: CallAdapterState): CallClientState => {\n return memoizeState(\n compositeState.userId,\n compositeState.devices,\n memoizeCalls(compositeState.call),\n // This is an unsafe type expansion.\n // compositeState.latestErrors can contain properties that are not valid in CallErrors.\n //\n // But there is no way to check for valid property names at runtime:\n // - The set of valid property names is built from types in the @azure/communication-calling.\n // Thus we don't have a literal array of allowed strings at runtime.\n // - Due to minification / uglification, the property names from the objects at runtime can't be used\n // to compare against permissible values inferred from the types.\n //\n // This is not a huge problem -- it simply means that our adapted selector will include some extra operations\n // that are unknown to the UI component and data binding libraries. Generic handling of the errors (e.g.,\n // just displaying them in some UI surface) will continue to work for these operations. Handling of\n // specific operations (e.g., acting on errors related to permission issues) will ignore these operations.\n compositeState.latestErrors as CallErrors,\n undefined ||\n /* @conditional-compile-remove(breakout-rooms) */ (compositeState.latestNotifications as CallNotifications),\n compositeState.displayName,\n compositeState.alternateCallerId,\n compositeState.environmentInfo\n );\n};\n"]}
1
+ {"version":3,"file":"useAdaptedSelector.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,uDAAuD;AAEvD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAO5D;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,QAAmB,EACnB,aAAwC,EACjB,EAAE;IACzB,OAAO,yBAAyB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,aAAa,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAIvC,QAAmB,EACnB,UAAsB,EACtB,aAAwC,EACjB,EAAE;;IACzB,MAAM,O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0GAA0G;IAC1G,cAAc,CAAC,YAA0B,EACzC,SAAS;QACP,iDAAiD,CAAE,cAAc,CAAC,mBAAyC,EAC7G,cAAc,CAAC,WAAW,EAC1B,cAAc,CAAC,iBAAiB,EAChC,cAAc,CAAC,eAAe,CAC/B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { useState, useEffect, useRef, useMemo } from 'react';\n\nimport memoizeOne from 'memoize-one';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallAdapterState } from '../adapter/CallAdapter';\nimport { CallErrors, CallState, CallClientState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */\nimport { CallNotifications } from '@internal/calling-stateful-client';\n/**\n * @private\n */\nexport const useAdaptedSelector = <SelectorT extends (state: CallClientState, props: any) => any>(\n selector: SelectorT,\n selectorProps?: Parameters<SelectorT>[1]\n): ReturnType<SelectorT> => {\n return useSelectorWithAdaptation(selector, adaptCompositeState, selectorProps);\n};\n\n/**\n * @private\n */\nexport const useSelectorWithAdaptation = <\n SelectorT extends (state: ReturnType<AdaptFuncT>, props: any) => any,\n AdaptFuncT extends (state: CallAdapterState) => any\n>(\n selector: SelectorT,\n adaptState: AdaptFuncT,\n selectorProps?: Parameters<SelectorT>[1]\n): ReturnType<SelectorT> => {\n const adapter = useAdapter();\n\n // Keeps track of whether the current component is mounted or not. If it has unmounted, make sure we do not modify the\n // state or it will cause React warnings in the console. https://skype.visualstudio.com/SPOOL/_workitems/edit/2453212\n const mounted = useRef(false);\n\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n });\n\n const callId = adapter.getState().call?.id;\n const callConfigProps = useMemo(\n () => ({\n callId\n }),\n [callId]\n );\n\n const [props, setProps] = useState(selector(adaptState(adapter.getState()), selectorProps ?? callConfigProps));\n const propRef = useRef(props);\n propRef.current = props;\n\n useEffect(() => {\n const onStateChange = (state: CallAdapterState): void => {\n if (!mounted.current) {\n return;\n }\n const newProps = selector(adaptState(state), selectorProps ?? callConfigProps);\n if (propRef.current !== newProps) {\n setProps(newProps);\n }\n };\n adapter.onStateChange(onStateChange);\n return () => {\n adapter.offStateChange(onStateChange);\n };\n }, [adaptState, adapter, selector, selectorProps, callConfigProps]);\n return props;\n};\n\nconst memoizeState = memoizeOne(\n (\n userId: CommunicationIdentifierKind,\n deviceManager: DeviceManagerState,\n calls: { [key: string]: CallState },\n latestErrors: CallErrors,\n latestNotifications?:\n | undefined\n | /* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */ CallNotifications,\n displayName?: string,\n alternateCallerId?: string,\n environmentInfo?: undefined | EnvironmentInfo\n ): CallClientState => ({\n userId,\n incomingCalls: {},\n incomingCallsEnded: {},\n callsEnded: {},\n deviceManager,\n callAgent: { displayName },\n calls,\n latestErrors,\n /* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */\n latestNotifications: latestNotifications ?? ({} as CallNotifications),\n alternateCallerId,\n environmentInfo\n })\n);\n\nconst memoizeCalls = memoizeOne((call?: CallState): { [key: string]: CallState } => (call ? { [call.id]: call } : {}));\n\nconst adaptCompositeState = (compositeState: CallAdapterState): CallClientState => {\n return memoizeState(\n compositeState.userId,\n compositeState.devices,\n memoizeCalls(compositeState.call),\n // This is an unsafe type expansion.\n // compositeState.latestErrors can contain properties that are not valid in CallErrors.\n //\n // But there is no way to check for valid property names at runtime:\n // - The set of valid property names is built from types in the @azure/communication-calling.\n // Thus we don't have a literal array of allowed strings at runtime.\n // - Due to minification / uglification, the property names from the objects at runtime can't be used\n // to compare against permissible values inferred from the types.\n //\n // This is not a huge problem -- it simply means that our adapted selector will include some extra operations\n // that are unknown to the UI component and data binding libraries. Generic handling of the errors (e.g.,\n // just displaying them in some UI surface) will continue to work for these operations. Handling of\n // specific operations (e.g., acting on errors related to permission issues) will ignore these operations.\n compositeState.latestErrors as CallErrors,\n undefined ||\n /* @conditional-compile-remove(breakout-rooms) */ (compositeState.latestNotifications as CallNotifications),\n compositeState.displayName,\n compositeState.alternateCallerId,\n compositeState.environmentInfo\n );\n};\n"]}