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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/communication-react.d.ts +45 -0
  2. package/dist/dist-cjs/communication-react/index.js +198 -78
  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/communication-react/src/index.d.ts +1 -0
  6. package/dist/dist-esm/communication-react/src/index.d.ts.map +1 -1
  7. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/index.d.ts +2 -0
  9. package/dist/dist-esm/react-components/src/index.d.ts.map +1 -1
  10. package/dist/dist-esm/react-components/src/index.js +2 -0
  11. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  12. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +55 -0
  13. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts.map +1 -0
  14. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js +61 -0
  15. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -0
  16. package/dist/dist-esm/react-components/src/permissions/index.d.ts +2 -0
  17. package/dist/dist-esm/react-components/src/permissions/index.d.ts.map +1 -0
  18. package/dist/dist-esm/react-components/src/permissions/index.js +4 -0
  19. package/dist/dist-esm/react-components/src/permissions/index.js.map +1 -0
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +5 -0
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts.map +1 -1
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +30 -9
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  24. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +36 -0
  25. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts.map +1 -1
  26. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts +3 -0
  27. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.d.ts.map +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +13 -0
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.d.ts.map +1 -1
  31. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +7 -48
  32. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.d.ts +1 -7
  34. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.d.ts.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +1 -21
  36. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +2 -1
  38. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts.map +1 -1
  39. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +1 -1
  40. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  41. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +2 -1
  42. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
  44. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +2 -1
  45. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts.map +1 -1
  46. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js +1 -1
  47. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
  48. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.d.ts +35 -0
  49. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.d.ts.map +1 -0
  50. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js +58 -0
  51. package/dist/dist-esm/react-composites/src/composites/common/styles/ModalLocalAndRemotePIP.styles.js.map +1 -0
  52. package/dist/dist-esm/react-composites/src/composites/common/styles/{MobilePane.styles.d.ts → Pane.styles.d.ts} +18 -2
  53. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.d.ts.map +1 -0
  54. package/dist/dist-esm/react-composites/src/composites/common/styles/{MobilePane.styles.js → Pane.styles.js} +29 -1
  55. package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.js.map +1 -0
  56. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +14 -0
  57. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts.map +1 -0
  58. package/dist/dist-esm/react-composites/src/composites/common/utils.js +32 -0
  59. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -0
  60. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +22 -13
  61. package/package.json +8 -8
  62. package/dist/dist-esm/react-composites/src/composites/common/styles/MobilePane.styles.d.ts.map +0 -1
  63. package/dist/dist-esm/react-composites/src/composites/common/styles/MobilePane.styles.js.map +0 -1
@@ -973,6 +973,10 @@ export declare interface CallCompositeProps extends BaseCompositeProps<CallCompo
973
973
  * Flags to enable/disable or customize UI elements of the {@link CallComposite}.
974
974
  */
975
975
  options?: CallCompositeOptions;
976
+ /**
977
+ * Set this to enable/disable capacities for different roles
978
+ */
979
+ role?: Role;
976
980
  }
977
981
 
978
982
  /**
@@ -1147,6 +1151,42 @@ export declare interface CallCompositeStrings {
1147
1151
  * Tooltip text used to inform a user that toggling microphone in lobby is not supported.
1148
1152
  */
1149
1153
  microphoneToggleInLobbyNotAllowed: string;
1154
+ /**
1155
+ * Side pane People section Title.
1156
+ */
1157
+ peoplePaneTitle: string;
1158
+ /**
1159
+ * Aria label string for return to call back button
1160
+ */
1161
+ returnToCallButtonAriaLabel?: string;
1162
+ /**
1163
+ * Aria Description string for return to call button
1164
+ */
1165
+ returnToCallButtonAriaDescription?: string;
1166
+ /**
1167
+ * control bar People button label
1168
+ */
1169
+ peopleButtonLabel: string;
1170
+ /**
1171
+ * control bar Chat button label.
1172
+ */
1173
+ chatButtonLabel: string;
1174
+ /**
1175
+ * Label for SidePaneHeader dismiss button
1176
+ */
1177
+ dismissSidePaneButtonLabel?: string;
1178
+ /**
1179
+ * Side pane People section subheader.
1180
+ */
1181
+ peoplePaneSubTitle: string;
1182
+ /**
1183
+ * Label for button to copy invite link
1184
+ */
1185
+ copyInviteLinkButtonLabel: string;
1186
+ /**
1187
+ * Label for menu item to remove participant
1188
+ */
1189
+ removeMenuLabel: string;
1150
1190
  }
1151
1191
 
1152
1192
  /**
@@ -6047,6 +6087,11 @@ export declare interface RemoteVideoStreamState {
6047
6087
  view?: VideoStreamRendererViewState;
6048
6088
  }
6049
6089
 
6090
+ /**
6091
+ * @beta
6092
+ */
6093
+ export declare type Role = 'Presenter' | 'Attendee' | 'Consumer';
6094
+
6050
6095
  /**
6051
6096
  * A button to start / stop screen sharing.
6052
6097
  *
@@ -191,7 +191,7 @@ const fromFlatCommunicationIdentifier = (id) => {
191
191
  // Copyright (c) Microsoft Corporation.
192
192
  // Licensed under the MIT license.
193
193
  // GENERATED FILE. DO NOT EDIT MANUALLY.
194
- var telemetryVersion = '1.3.2-alpha-202207200014.0';
194
+ var telemetryVersion = '1.3.2-alpha-202207230015.0';
195
195
 
196
196
  // Copyright (c) Microsoft Corporation.
197
197
  /**
@@ -7752,6 +7752,60 @@ const HoldButton = (props) => {
7752
7752
  return (React__default['default'].createElement(ControlBarButton, Object.assign({}, props, { strings: strings, onClick: onToggleHold !== null && onToggleHold !== void 0 ? onToggleHold : props.onClick, onRenderOnIcon: onRenderResumeIcon, onRenderOffIcon: onRenderHoldIcon })));
7753
7753
  };
7754
7754
 
7755
+ // Copyright (c) Microsoft Corporation.
7756
+ /**
7757
+ * @internal
7758
+ */
7759
+ const presenterPermissions = {
7760
+ cameraButton: true,
7761
+ microphoneButton: true,
7762
+ screenShare: true,
7763
+ participantList: true
7764
+ };
7765
+ /**
7766
+ * @internal
7767
+ */
7768
+ const consumerPermissions = {
7769
+ cameraButton: false,
7770
+ microphoneButton: false,
7771
+ screenShare: false,
7772
+ participantList: false
7773
+ };
7774
+ /**
7775
+ * @internal
7776
+ */
7777
+ const attendeePermissions = {
7778
+ cameraButton: true,
7779
+ microphoneButton: true,
7780
+ screenShare: false,
7781
+ participantList: true
7782
+ };
7783
+ /**
7784
+ * @internal
7785
+ */
7786
+ const PermissionsContext = React.createContext(presenterPermissions);
7787
+ /**
7788
+ * @internal
7789
+ */
7790
+ const _PermissionsProvider = (props) => {
7791
+ const { permissions, children } = props;
7792
+ return React__default['default'].createElement(PermissionsContext.Provider, { value: permissions }, children);
7793
+ };
7794
+ /**
7795
+ * @internal
7796
+ */
7797
+ const _getPermissions = (role) => {
7798
+ if (role === 'Consumer') {
7799
+ return consumerPermissions;
7800
+ }
7801
+ else if (role === 'Attendee') {
7802
+ return attendeePermissions;
7803
+ }
7804
+ else {
7805
+ return presenterPermissions;
7806
+ }
7807
+ };
7808
+
7755
7809
  // Copyright (c) Microsoft Corporation.
7756
7810
  // Licensed under the MIT license.
7757
7811
  /**
@@ -12403,7 +12457,7 @@ const CallCompositeIcon = (props) => (React__default['default'].createElement(re
12403
12457
  */
12404
12458
  const CallWithChatCompositeIcon = (props) => (React__default['default'].createElement(react.FontIcon, Object.assign({}, props)));
12405
12459
 
12406
- var call$d={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",defaultPlaceHolder:"Select an option",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",soundLabel:"Sound",startCallButtonLabel:"Start call",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby."};var chat$d={chatListHeader:"In this chat",uploadFile:"Upload File"};var callWithChat$d={peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",chatButtonLabel:"Chat",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipOpen:"Show chat",chatButtonTooltipClose:"Hide chat",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",chatPaneTitle:"Chat",chatButtonNewMessageNotificationLabel:"New Message",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButtonLabel:"Close",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back"};var en_US = {call:call$d,chat:chat$d,callWithChat:callWithChat$d};
12460
+ var call$d={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",chatButtonLabel:"Chat",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",copyInviteLinkButtonLabel:"Copy invite link",defaultPlaceHolder:"Select an option",dismissSidePaneButtonLabel:"Close",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby.",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",peopleButtonLabel:"People",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back",soundLabel:"Sound",startCallButtonLabel:"Start call"};var chat$d={chatListHeader:"In this chat",uploadFile:"Upload File"};var callWithChat$d={chatButtonLabel:"Chat",chatButtonNewMessageNotificationLabel:"New Message",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipClose:"Hide chat",chatButtonTooltipOpen:"Show chat",chatPaneTitle:"Chat",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButtonLabel:"Close",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",peoplePaneSubTitle:"In this call",peoplePaneTitle:"People",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back"};var en_US = {call:call$d,chat:chat$d,callWithChat:callWithChat$d};
12407
12461
 
12408
12462
  var call$c={cameraLabel:"Camera",cameraPermissionDenied:"Your browser is blocking access to your camera",cameraTurnedOff:"Your camera is turned off",close:"Close",complianceBannerNowOnlyRecording:"You are now only recording this meeting.",complianceBannerNowOnlyTranscription:"You are now only transcribing this meeting.",complianceBannerRecordingAndTranscriptionSaved:"Recording and transcription are being saved.",complianceBannerRecordingAndTranscriptionStarted:"Recording and transcription have started.",complianceBannerRecordingAndTranscriptionStopped:"Recording and transcription have stopped.",complianceBannerRecordingSaving:"Recording is being saved.",complianceBannerRecordingStarted:"Recording has started.",complianceBannerRecordingStopped:"Recording has stopped.",complianceBannerTranscriptionStarted:"Transcription has started.",complianceBannerTranscriptionConsent:"By joining, you are giving consent for this meeting to be transcribed.",complianceBannerTranscriptionSaving:"Transcription is being saved.",complianceBannerTranscriptionStopped:"Transcription has stopped.",configurationPageTitle:"Start a call",defaultPlaceHolder:"Select an option",failedToJoinCallDueToNoNetworkMoreDetails:"Call was disconnected due to a network issue. Check your connection and join again.",failedToJoinCallDueToNoNetworkTitle:"Call disconnected",failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails:"You were not granted entry in the call. If this was a mistake, re-join the call.",failedToJoinTeamsMeetingReasonAccessDeniedTitle:"Dismissed from lobby",learnMore:"Learn more",leftCallMoreDetails:"If this was a mistake, re-join the call.",leftCallTitle:"You left the call",lobbyScreenConnectingToCallTitle:"Joining call",lobbyScreenWaitingToBeAdmittedTitle:"Waiting to be admitted",microphonePermissionDenied:"Your browser is blocking access to your microphone",mutedMessage:"You're muted",networkReconnectMoreDetails:"Looks like something went wrong. We're trying to get back into the call.",networkReconnectTitle:"Hold on",privacyPolicy:"Privacy policy",rejoinCallButtonLabel:"Re-join call",removedFromCallMoreDetails:"Another participant removed you from the call.",removedFromCallTitle:"You were removed",soundLabel:"Sound",startCallButtonLabel:"Start call",microphoneToggleInLobbyNotAllowed:"Cannot mute or unmute while in lobby."};var chat$c={chatListHeader:"In this chat"};var callWithChat$c={peopleButtonLabel:"People",peopleButtonTooltipOpen:"Show participants",peopleButtonTooltipClose:"Hide participants",chatButtonLabel:"Chat",chatButtonTooltipClosedWithMessageCount:"Show chat ({unreadMessagesCount} unread)",chatButtonTooltipOpen:"Show chat",chatButtonTooltipClose:"Hide chat",moreDrawerAudioDeviceMenuTitle:"Audio Device",moreDrawerMicrophoneMenuTitle:"Microphone",moreDrawerSpeakerMenuTitle:"Speaker",moreDrawerButtonLabel:"More options",moreDrawerButtonTooltip:"More options",peoplePaneTitle:"People",peoplePaneSubTitle:"In this call",chatPaneTitle:"Chat",chatButtonNewMessageNotificationLabel:"New Message",pictureInPictureTileAriaLabel:"Video Feeds. Click to return to call screen.",removeMenuLabel:"Remove",copyInviteLinkButtonLabel:"Copy invite link",dismissSidePaneButton:"Close",returnToCallButtonAriaDescription:"Return to Call",returnToCallButtonAriaLabel:"Back"};var en_GB = {call:call$c,chat:chat$c,callWithChat:callWithChat$c};
12409
12463
 
@@ -15629,26 +15683,41 @@ const MainScreen = (props) => {
15629
15683
  const page = useSelector$1(getPage);
15630
15684
  const adapter = useAdapter();
15631
15685
  const locale = useLocale();
15686
+ let pageElement;
15632
15687
  switch (page) {
15633
15688
  case 'configuration':
15634
- return (React__default['default'].createElement(ConfigurationPage, { mobileView: props.mobileView, startCallHandler: () => {
15689
+ pageElement = (React__default['default'].createElement(ConfigurationPage, { mobileView: props.mobileView, startCallHandler: () => {
15635
15690
  adapter.joinCall();
15636
15691
  } }));
15692
+ break;
15637
15693
  case 'accessDeniedTeamsMeeting':
15638
- return (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedTeamsMeeting", title: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle, moreDetails: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails, dataUiId: 'access-denied-teams-meeting-page' }));
15694
+ pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageAccessDeniedTeamsMeeting", title: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedTitle, moreDetails: locale.strings.call.failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails, dataUiId: 'access-denied-teams-meeting-page' }));
15695
+ break;
15639
15696
  case 'removedFromCall':
15640
- return (React__default['default'].createElement(NoticePage, { iconName: "NoticePageRemovedFromCall", title: locale.strings.call.removedFromCallTitle, moreDetails: locale.strings.call.removedFromCallMoreDetails, dataUiId: 'removed-from-call-page' }));
15697
+ pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageRemovedFromCall", title: locale.strings.call.removedFromCallTitle, moreDetails: locale.strings.call.removedFromCallMoreDetails, dataUiId: 'removed-from-call-page' }));
15698
+ break;
15641
15699
  case 'joinCallFailedDueToNoNetwork':
15642
- return (React__default['default'].createElement(NoticePage, { iconName: "NoticePageJoinCallFailedDueToNoNetwork", title: locale.strings.call.failedToJoinCallDueToNoNetworkTitle, moreDetails: locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails, dataUiId: 'join-call-failed-due-to-no-network-page' }));
15700
+ pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageJoinCallFailedDueToNoNetwork", title: locale.strings.call.failedToJoinCallDueToNoNetworkTitle, moreDetails: locale.strings.call.failedToJoinCallDueToNoNetworkMoreDetails, dataUiId: 'join-call-failed-due-to-no-network-page' }));
15701
+ break;
15643
15702
  case 'leftCall':
15644
- return (React__default['default'].createElement(NoticePage, { iconName: "NoticePageLeftCall", title: locale.strings.call.leftCallTitle, moreDetails: locale.strings.call.leftCallMoreDetails, dataUiId: 'left-call-page' }));
15703
+ pageElement = (React__default['default'].createElement(NoticePage, { iconName: "NoticePageLeftCall", title: locale.strings.call.leftCallTitle, moreDetails: locale.strings.call.leftCallMoreDetails, dataUiId: 'left-call-page' }));
15704
+ break;
15645
15705
  case 'lobby':
15646
- return React__default['default'].createElement(LobbyPage, { mobileView: props.mobileView, options: props.options });
15706
+ pageElement = React__default['default'].createElement(LobbyPage, { mobileView: props.mobileView, options: props.options });
15707
+ break;
15647
15708
  case 'call':
15648
- return (React__default['default'].createElement(CallPage, { onRenderAvatar: onRenderAvatar, callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, options: props.options }));
15709
+ pageElement = (React__default['default'].createElement(CallPage, { onRenderAvatar: onRenderAvatar, callInvitationURL: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: props.mobileView, options: props.options }));
15710
+ break;
15649
15711
  default:
15650
15712
  throw new Error('Invalid call composite page');
15651
15713
  }
15714
+ /* @conditional-compile-remove(rooms) */
15715
+ const permissions = _getPermissions(props.role);
15716
+ // default retElement for stable version
15717
+ let retElement = pageElement;
15718
+ /* @conditional-compile-remove(rooms) */
15719
+ retElement = React__default['default'].createElement(_PermissionsProvider, { permissions: permissions }, pageElement);
15720
+ return retElement;
15652
15721
  };
15653
15722
  /**
15654
15723
  * A customizable UI composite for calling experience.
@@ -15660,7 +15729,9 @@ const MainScreen = (props) => {
15660
15729
  * @public
15661
15730
  */
15662
15731
  const CallComposite = (props) => {
15663
- const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;
15732
+ const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop',
15733
+ /* @conditional-compile-remove(rooms) */
15734
+ role } = props;
15664
15735
  React.useEffect(() => {
15665
15736
  (() => __awaiter$6(void 0, void 0, void 0, function* () {
15666
15737
  yield adapter.askDevicePermission({ video: true, audio: true });
@@ -15676,7 +15747,9 @@ const CallComposite = (props) => {
15676
15747
  return (React__default['default'].createElement("div", { className: mainScreenContainerClassName },
15677
15748
  React__default['default'].createElement(BaseProvider, Object.assign({}, props),
15678
15749
  React__default['default'].createElement(CallAdapterProvider, { adapter: adapter },
15679
- React__default['default'].createElement(MainScreen, { callInvitationUrl: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: mobileView, options: options })))));
15750
+ React__default['default'].createElement(MainScreen, { callInvitationUrl: callInvitationUrl, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: onFetchParticipantMenuItems, mobileView: mobileView, options: options,
15751
+ /* @conditional-compile-remove(rooms) */
15752
+ role: role })))));
15680
15753
  };
15681
15754
 
15682
15755
  /**
@@ -17327,6 +17400,61 @@ const localAndRemotePIPSelector = reselect__namespace.createSelector([getDisplay
17327
17400
  };
17328
17401
  });
17329
17402
 
17403
+ // Copyright (c) Microsoft Corporation.
17404
+ /**
17405
+ * Default Modal PIP related pixel measurements used for ModalLocalAndremotePIP and common/utils.
17406
+ *
17407
+ * @private
17408
+ */
17409
+ const MODAL_PIP_DEFAULT_PX = {
17410
+ rightPositionPx: 16,
17411
+ topPositionPx: 52,
17412
+ widthPx: 88,
17413
+ heightPx: 128
17414
+ };
17415
+ /**
17416
+ * @private
17417
+ */
17418
+ const getPipStyles = (theme) => ({
17419
+ modal: {
17420
+ main: Object.assign(Object.assign({ borderRadius: theme.effects.roundedCorner4, boxShadow: theme.effects.elevation8,
17421
+ // Above the message thread / people pane.
17422
+ zIndex: 2 }, (theme.rtl
17423
+ ? { left: _pxToRem(MODAL_PIP_DEFAULT_PX.rightPositionPx) }
17424
+ : { right: _pxToRem(MODAL_PIP_DEFAULT_PX.rightPositionPx) })), { top: _pxToRem(MODAL_PIP_DEFAULT_PX.topPositionPx) })
17425
+ }
17426
+ });
17427
+ /**
17428
+ * @private
17429
+ */
17430
+ const PIPContainerStyle = {
17431
+ root: { position: 'absolute', width: '100%', height: '100%', pointerEvents: 'none' }
17432
+ };
17433
+ /**
17434
+ * @private
17435
+ */
17436
+ const hiddenStyle = react.concatStyleSets(PIPContainerStyle, { root: { display: 'none' } });
17437
+ /**
17438
+ * @private
17439
+ */
17440
+ const modalStyle = {
17441
+ main: {
17442
+ minWidth: 'min-content',
17443
+ minHeight: 'min-content',
17444
+ position: 'absolute',
17445
+ overflow: 'hidden',
17446
+ // pointer events for root Modal div set to auto to make LocalAndRemotePIP interactive
17447
+ pointerEvents: 'auto',
17448
+ touchAction: 'none'
17449
+ },
17450
+ root: {
17451
+ width: '100%',
17452
+ height: '100%',
17453
+ // pointer events for root Modal div set to none to make descendants interactive
17454
+ pointerEvents: 'none'
17455
+ }
17456
+ };
17457
+
17330
17458
  // Copyright (c) Microsoft Corporation.
17331
17459
  /**
17332
17460
  * Drag options for Modal in {@link ModalLocalAndRemotePIP} component
@@ -17359,27 +17487,6 @@ const ModalLocalAndRemotePIP = (props) => {
17359
17487
  return (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
17360
17488
  React__default['default'].createElement(_ModalLocalAndRemotePIP, Object.assign({}, props), props.children)));
17361
17489
  };
17362
- const PIPContainerStyle = {
17363
- root: { position: 'absolute', width: '100%', height: '100%', pointerEvents: 'none' }
17364
- };
17365
- const hiddenStyle = react.concatStyleSets(PIPContainerStyle, { root: { display: 'none' } });
17366
- const modalStyle = {
17367
- main: {
17368
- minWidth: 'min-content',
17369
- minHeight: 'min-content',
17370
- position: 'absolute',
17371
- overflow: 'hidden',
17372
- // pointer events for root Modal div set to auto to make LocalAndRemotePIP interactive
17373
- pointerEvents: 'auto',
17374
- touchAction: 'none'
17375
- },
17376
- root: {
17377
- width: '100%',
17378
- height: '100%',
17379
- // pointer events for root Modal div set to none to make descendants interactive
17380
- pointerEvents: 'none'
17381
- }
17382
- };
17383
17490
 
17384
17491
  // Copyright (c) Microsoft Corporation.
17385
17492
  /**
@@ -17484,7 +17591,7 @@ const PeoplePaneContent = (props) => {
17484
17591
  /**
17485
17592
  * Create default contextual menu items for particant
17486
17593
  * @param participant - participant to create contextual menu items for
17487
- * @param callWithChatStrings - localized strings for menu item text
17594
+ * @param strings - localized strings for menu item text
17488
17595
  * @param onRemoveParticipant - callback to remove participant
17489
17596
  * @param localParticipantUserId - Local participant user id
17490
17597
  * @returns - IContextualMenuItem[]
@@ -17580,6 +17687,34 @@ const mobilePaneButtonStyles = {
17580
17687
  },
17581
17688
  labelChecked: { fontWeight: 600 }
17582
17689
  };
17690
+ /**
17691
+ * @private
17692
+ */
17693
+ const hiddenStyles = {
17694
+ root: {
17695
+ display: 'none'
17696
+ }
17697
+ };
17698
+ /**
17699
+ * @private
17700
+ */
17701
+ const sidePaneStyles = {
17702
+ root: {
17703
+ height: '100%',
17704
+ padding: '0.5rem 0.25rem',
17705
+ maxWidth: '21.5rem'
17706
+ }
17707
+ };
17708
+ /**
17709
+ * @private
17710
+ */
17711
+ const availableSpaceStyles = { root: { width: '100%', height: '100%' } };
17712
+ /**
17713
+ * @private
17714
+ */
17715
+ const sidePaneTokens = {
17716
+ childrenGap: '0.5rem'
17717
+ };
17583
17718
 
17584
17719
  // Copyright (c) Microsoft Corporation.
17585
17720
  /**
@@ -17613,6 +17748,34 @@ const TabHeader = (props) => {
17613
17748
  React__default['default'].createElement(react.DefaultButton, { styles: mobilePaneHiddenIconStyles, onRenderIcon: () => React__default['default'].createElement(CallWithChatCompositeIcon, { iconName: "ChevronLeft" }) })));
17614
17749
  };
17615
17750
 
17751
+ // Copyright (c) Microsoft Corporation.
17752
+ /**
17753
+ * @private
17754
+ */
17755
+ // Use document.getElementById until Fluent's Stack supports componentRef property: https://github.com/microsoft/fluentui/issues/20410
17756
+ const useMinMaxDragPosition = (modalLayerHostId, rtl) => {
17757
+ const modalHostRef = React.useRef(document.getElementById(modalLayerHostId));
17758
+ const modalHostWidth = _useContainerWidth(modalHostRef);
17759
+ const modalHostHeight = _useContainerHeight(modalHostRef);
17760
+ const minDragPosition = React.useMemo(() => modalHostWidth === undefined
17761
+ ? undefined
17762
+ : {
17763
+ x: rtl
17764
+ ? -1 * MODAL_PIP_DEFAULT_PX.rightPositionPx
17765
+ : MODAL_PIP_DEFAULT_PX.rightPositionPx - modalHostWidth + MODAL_PIP_DEFAULT_PX.widthPx,
17766
+ y: -1 * MODAL_PIP_DEFAULT_PX.topPositionPx
17767
+ }, [modalHostWidth, rtl]);
17768
+ const maxDragPosition = React.useMemo(() => modalHostWidth === undefined || modalHostHeight === undefined
17769
+ ? undefined
17770
+ : {
17771
+ x: rtl
17772
+ ? modalHostWidth - MODAL_PIP_DEFAULT_PX.rightPositionPx - MODAL_PIP_DEFAULT_PX.widthPx
17773
+ : MODAL_PIP_DEFAULT_PX.rightPositionPx,
17774
+ y: modalHostHeight - MODAL_PIP_DEFAULT_PX.topPositionPx - MODAL_PIP_DEFAULT_PX.heightPx
17775
+ }, [modalHostHeight, modalHostWidth, rtl]);
17776
+ return { minDragPosition: minDragPosition, maxDragPosition: maxDragPosition };
17777
+ };
17778
+
17616
17779
  var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
17617
17780
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17618
17781
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -17654,23 +17817,7 @@ const CallWithChatPane = (props) => {
17654
17817
  });
17655
17818
  const peopleContent = (React__default['default'].createElement(CallAdapterProvider, { adapter: props.callAdapter },
17656
17819
  React__default['default'].createElement(PeoplePaneContent, Object.assign({}, props, { onRemoveParticipant: removeParticipantFromCallWithChat, setDrawerMenuItems: setDrawerMenuItems, strings: callWithChatStrings }))));
17657
- // Use document.getElementById until Fluent's Stack supports componentRef property: https://github.com/microsoft/fluentui/issues/20410
17658
- const modalLayerHostElement = document.getElementById(props.modalLayerHostId);
17659
- const modalHostRef = React.useRef(modalLayerHostElement);
17660
- const modalHostWidth = _useContainerWidth(modalHostRef);
17661
- const modalHostHeight = _useContainerHeight(modalHostRef);
17662
- const minDragPosition = React.useMemo(() => modalHostWidth === undefined
17663
- ? undefined
17664
- : {
17665
- x: props.rtl ? -1 * modalPipRightPositionPx : modalPipRightPositionPx - modalHostWidth + modalPipWidthPx,
17666
- y: -1 * modalPipTopPositionPx
17667
- }, [modalHostWidth, props.rtl]);
17668
- const maxDragPosition = React.useMemo(() => modalHostWidth === undefined || modalHostHeight === undefined
17669
- ? undefined
17670
- : {
17671
- x: props.rtl ? modalHostWidth - modalPipRightPositionPx - modalPipWidthPx : modalPipRightPositionPx,
17672
- y: modalHostHeight - modalPipTopPositionPx - modalPipHeightPx
17673
- }, [modalHostHeight, modalHostWidth, props.rtl]);
17820
+ const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);
17674
17821
  const pipStyles = React.useMemo(() => getPipStyles(theme), [theme]);
17675
17822
  const dataUiId = props.activePane === 'chat'
17676
17823
  ? 'call-with-chat-composite-chat-pane'
@@ -17684,37 +17831,10 @@ const CallWithChatPane = (props) => {
17684
17831
  React__default['default'].createElement(react.Stack.Item, { verticalFill: true, styles: scrollableContainerContents },
17685
17832
  React__default['default'].createElement(react.Stack, { styles: props.activePane === 'chat' ? availableSpaceStyles : hiddenStyles }, chatContent),
17686
17833
  React__default['default'].createElement(react.Stack, { styles: props.activePane === 'people' ? availableSpaceStyles : hiddenStyles }, peopleContent)))),
17687
- props.mobileView && (React__default['default'].createElement(ModalLocalAndRemotePIP, { callAdapter: props.callAdapter, modalLayerHostId: props.modalLayerHostId, hidden: hidden, styles: pipStyles, minDragPosition: minDragPosition, maxDragPosition: maxDragPosition })),
17834
+ props.mobileView && (React__default['default'].createElement(ModalLocalAndRemotePIP, { callAdapter: props.callAdapter, modalLayerHostId: props.modalLayerHostId, hidden: hidden, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition })),
17688
17835
  drawerMenuItems.length > 0 && (React__default['default'].createElement(react.Stack, { styles: drawerContainerStyles },
17689
17836
  React__default['default'].createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems })))));
17690
17837
  };
17691
- const hiddenStyles = {
17692
- root: {
17693
- display: 'none'
17694
- }
17695
- };
17696
- const sidePaneStyles = {
17697
- root: {
17698
- height: '100%',
17699
- padding: '0.5rem 0.25rem',
17700
- maxWidth: '21.5rem'
17701
- }
17702
- };
17703
- const availableSpaceStyles = { root: { width: '100%', height: '100%' } };
17704
- const sidePaneTokens = {
17705
- childrenGap: '0.5rem'
17706
- };
17707
- const modalPipRightPositionPx = 16;
17708
- const modalPipTopPositionPx = 52;
17709
- const modalPipWidthPx = 88;
17710
- const modalPipHeightPx = 128;
17711
- const getPipStyles = (theme) => ({
17712
- modal: {
17713
- main: Object.assign(Object.assign({ borderRadius: theme.effects.roundedCorner4, boxShadow: theme.effects.elevation8,
17714
- // Above the message thread / people pane.
17715
- zIndex: 2 }, (theme.rtl ? { left: _pxToRem(modalPipRightPositionPx) } : { right: _pxToRem(modalPipRightPositionPx) })), { top: _pxToRem(modalPipTopPositionPx) })
17716
- }
17717
- });
17718
17838
 
17719
17839
  // Copyright (c) Microsoft Corporation.
17720
17840
  const CallWithChatScreen = (props) => {