@azure/communication-react 1.14.1-alpha-202403210013 → 1.14.1-alpha-202403261958
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.
- package/dist/communication-react.d.ts +44 -38
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BgK9tOAk.js → RichTextSendBoxWrapper-BRqOsupu.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BgK9tOAk.js.map → RichTextSendBoxWrapper-BRqOsupu.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-B_kqOVlM.js → index-Ba2HAv_Y.js} +1304 -920
- package/dist/dist-cjs/communication-react/index-Ba2HAv_Y.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -2
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +0 -1
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js +0 -2
- package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +17 -16
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +2 -4
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -2
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +0 -6
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +0 -4
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +1 -9
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +12 -7
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +3 -10
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +1 -2
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -2
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +0 -5
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +19 -13
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -5
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +0 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +0 -5
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js +0 -2
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js +0 -3
- package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +4 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +5 -8
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.js +0 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/AttachmentCard.d.ts +39 -0
- package/dist/dist-esm/react-components/src/components/{FileCard.js → AttachmentCard.js} +17 -17
- package/dist/dist-esm/react-components/src/components/AttachmentCard.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/AttachmentCardGroup.d.ts +16 -0
- package/dist/dist-esm/react-components/src/components/{FileCardGroup.js → AttachmentCardGroup.js} +5 -5
- package/dist/dist-esm/react-components/src/components/AttachmentCardGroup.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/AttachmentDownloadCards.d.ts +49 -0
- package/dist/dist-esm/react-components/src/components/{FileDownloadCards.js → AttachmentDownloadCards.js} +19 -19
- package/dist/dist-esm/react-components/src/components/AttachmentDownloadCards.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/{FileUploadCards.d.ts → AttachmentUploadCards.d.ts} +15 -15
- package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.js +34 -0
- package/dist/dist-esm/react-components/src/components/AttachmentUploadCards.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/CameraButton.js +0 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +2 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +1 -10
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +5 -3
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.d.ts +40 -0
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js +77 -0
- package/dist/dist-esm/react-components/src/components/MeetingReactionOverlay.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +4 -5
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +6 -4
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +3 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +20 -6
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.d.ts +1 -8
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +42 -17
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +8 -8
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.d.ts +10 -10
- package/dist/dist-esm/react-components/src/components/SendBox.js +13 -13
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +7 -5
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +58 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.d.ts +14 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js +149 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteContentShareReactionOverlay.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +14 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.d.ts +11 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.js +23 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/reactionUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +7 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +5 -6
- package/dist/dist-esm/react-components/src/components/VideoTile.js +3 -51
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +7 -5
- package/dist/dist-esm/react-components/src/components/index.js +3 -3
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.d.ts +70 -0
- package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js +259 -0
- package/dist/dist-esm/react-components/src/components/styles/ReactionOverlay.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +2 -2
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js +5 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextInputBoxComponent.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -2
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +8 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +6 -3
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +3 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/common.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/utils/common.js +3 -3
- package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +6 -6
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +6 -6
- package/dist/dist-esm/react-components/src/theming/icons.js +0 -7
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/Attachment.d.ts +142 -0
- package/dist/dist-esm/{react-composites/src/composites/ChatComposite/file-sharing/FileUploadHandler.js → react-components/src/types/Attachment.js} +1 -1
- package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +5 -0
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/types/index.js +1 -0
- package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +18 -60
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallingSoundSubscriber.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +3 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +14 -65
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +10 -10
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +0 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +25 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.d.ts +10 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +1 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +12 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +4 -18
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +2 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +2 -22
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +1 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +1 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +6 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +5 -27
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.js +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +5 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +3 -12
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/getFirstSpotlightedRemoteParticipantSelector.d.ts +15 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/getFirstSpotlightedRemoteParticipantSelector.js +32 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/getFirstSpotlightedRemoteParticipantSelector.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +10 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js +28 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/spotlightUtils.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/spotlightUtils.js +36 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/spotlightUtils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/useConsoleErrors.js +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/useConsoleErrors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +7 -20
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +1 -10
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +2 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +5 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.d.ts +2 -69
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUpload.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +5 -10
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +7 -8
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +11 -15
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +14 -3
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +16 -17
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +0 -3
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js +1 -6
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js +1 -4
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +2 -29
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +0 -8
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependency.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependency.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependencyLazy.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/resolveVideoEffectDependencyLazy.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/styles/ParticipantContainer.styles.d.ts +5 -1
- package/dist/dist-esm/react-composites/src/composites/common/styles/ParticipantContainer.styles.js +29 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/ParticipantContainer.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +2 -0
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-B_kqOVlM.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/FileCard.d.ts +0 -39
- package/dist/dist-esm/react-components/src/components/FileCard.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/FileCardGroup.d.ts +0 -16
- package/dist/dist-esm/react-components/src/components/FileCardGroup.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +0 -114
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/FileUploadCards.js +0 -34
- package/dist/dist-esm/react-components/src/components/FileUploadCards.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadHandler.d.ts +0 -10
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadHandler.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalDeviceSettings.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/LocalDeviceSettings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAmB,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACvF,2DAA2D;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,iDAAiD;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAsB,yBAAyB,EAAE,4CAA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AA+B,EAAC,MAAM,EAAE,gBAAgB;gBACxE,oBAAC,4BAA4B,IAC3B,kBAAkB,EAAE,kBAAkB,EACtC,oBAAoB,EAAE,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,KAAK;oBACnD,iDAAiD;oBACjD,aAAa,EAAE,aAAa;oBAC5B,iDAAiD;oBACjD,6BAA6B,EAAE,KAAK,CAAC,6BAA6B,GAClE;gBACF,oBAAC,sCAAsC,OAAG,CACpC,CACF,CACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,OAA0B,EAAU,EAAE;IAC7D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACvE,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AudioDeviceInfo, VideoDeviceInfo } from '@azure/communication-calling';\nimport { Dropdown, IDropdownOption, Label, mergeStyles, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(video-background-effects) */\nimport { DefaultButton } from '@fluentui/react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useEffect } from 'react';\nimport { useTheme, VideoStreamOptions, _DevicePermissionDropdown } from '@internal/react-components';\nimport React from 'react';\nimport { CallCompositeIcon } from '../../common/icons';\nimport { useLocale } from '../../localization';\nimport {\n dropDownStyles,\n dropDownTitleIconStyles,\n mainStackTokens,\n optionIconStyles,\n soundStackTokens\n} from '../styles/LocalDeviceSettings.styles';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(video-background-effects) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { ConfigurationPageCameraDropdown } from './ConfigurationPageCameraDropdown';\nimport { ConfigurationPageMicDropdown } from './ConfigurationPageMicDropdown';\n/* @conditional-compile-remove(call-readiness) */\nimport { useHandlers } from '../hooks/useHandlers';\nimport { cameraAndVideoEffectsContainerStyleDesktop } from '../styles/CallConfiguration.styles';\n/* @conditional-compile-remove(video-background-effects) */\nimport { effectsButtonStyles } from '../styles/CallConfiguration.styles';\n\ntype iconType = 'Camera' | 'Microphone' | 'Speaker';\n\nconst getDropDownList = (list: Array<VideoDeviceInfo | AudioDeviceInfo>): IDropdownOption[] => {\n // Remove duplicates\n const noDuplicates = new Map<string, VideoDeviceInfo | AudioDeviceInfo>();\n for (const item of list) {\n noDuplicates.set(item.id, item);\n }\n const dropdownList: IDropdownOption[] = [];\n for (const item of noDuplicates.values()) {\n dropdownList.push({\n key: item.id,\n text: item.name === '' ? item.deviceType : item.name\n });\n }\n return dropdownList;\n};\n\nconst getOptionIcon = (type: iconType): JSX.Element | undefined => {\n if (type === 'Camera') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsCamera\" className={optionIconStyles} />;\n } else if (type === 'Microphone') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsMic\" className={optionIconStyles} />;\n } else if (type === 'Speaker') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsSpeaker\" className={optionIconStyles} />;\n } else {\n return undefined;\n }\n};\n\nconst onRenderTitle = (iconType: iconType, props?: IDropdownOption[]): JSX.Element => {\n const icon = props && getOptionIcon(iconType);\n return props ? (\n <div className={dropDownTitleIconStyles}>\n {icon}\n <span>{props[0].text}</span>\n </div>\n ) : (\n <></>\n );\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface LocalDeviceSettingsType {\n cameras: VideoDeviceInfo[];\n microphones: AudioDeviceInfo[];\n speakers: AudioDeviceInfo[];\n selectedCamera?: VideoDeviceInfo;\n selectedMicrophone?: AudioDeviceInfo;\n selectedSpeaker?: AudioDeviceInfo;\n microphonePermissionGranted: boolean | undefined;\n cameraPermissionGranted: boolean | undefined;\n onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;\n onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;\n onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission?: () => void;\n /* @conditional-compile-remove(video-background-effects) */\n onClickVideoEffects?: () => void;\n}\n\n/**\n * @private\n */\nexport const LocalDeviceSettings = (props: LocalDeviceSettingsType): JSX.Element => {\n const theme = useTheme();\n const locale = useLocale();\n /* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(video-background-effects) */ /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(video-background-effects) */\n const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;\n const defaultPlaceHolder = locale.strings.call.defaultPlaceHolder;\n const cameraLabel = locale.strings.call.cameraLabel;\n const soundLabel = locale.strings.call.soundLabel;\n const noSpeakersLabel = locale.strings.call.noSpeakersLabel;\n const noCameraLabel = locale.strings.call.noCamerasLabel;\n const noMicLabel = locale.strings.call.noMicrophonesLabel;\n /* @conditional-compile-remove(rooms) */\n const role = adapter.getState().call?.role;\n\n const cameraPermissionGranted = props.cameraPermissionGranted;\n const micPermissionGranted = props.microphonePermissionGranted;\n\n let roleCanUseCamera = true;\n let roleCanUseMic = true;\n\n /* @conditional-compile-remove(rooms) */\n roleCanUseCamera = role === 'Consumer' ? false : true;\n /* @conditional-compile-remove(rooms) */\n roleCanUseMic = role === 'Consumer' ? false : true;\n\n // TODO: speaker permission is tied to microphone permission (when you request 'audio' permission using the SDK) its\n // actually granting access to query both microphone and speaker. However the browser popup asks you explicity for\n // 'microphone'. This needs investigation on how we want to handle this and maybe needs follow up with SDK team.\n /* @conditional-compile-remove(call-readiness) */\n useEffect(() => {\n if (cameraPermissionGranted) {\n adapter.queryCameras();\n }\n if (micPermissionGranted) {\n adapter.queryMicrophones();\n }\n adapter.querySpeakers();\n }, [adapter, cameraPermissionGranted, micPermissionGranted]);\n\n /* @conditional-compile-remove(call-readiness) */\n const dropdownProps = useHandlers(_DevicePermissionDropdown);\n\n const hasCameras = props.cameras.length > 0;\n const hasMicrophones = props.microphones.length > 0;\n const hasSpeakers = props.speakers.length > 0;\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafariWithNoSpeakers =\n adapter.getState().environmentInfo?.environment.browser.toLowerCase() === 'safari' && !hasSpeakers;\n\n const cameraGrantedDropdown = (\n <Dropdown\n data-ui-id=\"call-composite-local-camera-settings\"\n aria-labelledby={'call-composite-local-camera-settings-label'}\n placeholder={hasCameras ? defaultPlaceHolder : noCameraLabel}\n options={cameraPermissionGranted ? getDropDownList(props.cameras) : [{ key: 'deniedOrUnknown', text: '' }]}\n styles={dropDownStyles(theme)}\n disabled={!cameraPermissionGranted || !hasCameras}\n errorMessage={\n props.cameraPermissionGranted === undefined || props.cameraPermissionGranted\n ? undefined\n : locale.strings.call.cameraPermissionDenied\n }\n defaultSelectedKey={\n micPermissionGranted\n ? props.selectedCamera\n ? props.selectedCamera.id\n : props.cameras\n ? props.cameras[0]?.id\n : ''\n : 'deniedOrUnknown'\n }\n onChange={(event, option, index) => {\n props.onSelectCamera(props.cameras[index ?? 0], localVideoViewOptions);\n }}\n onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Camera', props)}\n />\n );\n\n const micGrantedDropdown = (\n <>\n {roleCanUseMic && (\n <Dropdown\n aria-labelledby={'call-composite-local-sound-settings-label'}\n placeholder={hasMicrophones ? defaultPlaceHolder : noMicLabel}\n styles={dropDownStyles(theme)}\n disabled={!micPermissionGranted || !hasMicrophones}\n errorMessage={\n props.microphonePermissionGranted === undefined || props.microphonePermissionGranted\n ? undefined\n : locale.strings.call.microphonePermissionDenied\n }\n options={micPermissionGranted ? getDropDownList(props.microphones) : [{ key: 'deniedOrUnknown', text: '' }]}\n defaultSelectedKey={\n micPermissionGranted\n ? props.selectedMicrophone\n ? props.selectedMicrophone.id\n : defaultDeviceId(props.microphones)\n : 'deniedOrUnknown'\n }\n onChange={(\n event: React.FormEvent<HTMLDivElement>,\n option?: IDropdownOption | undefined,\n index?: number | undefined\n ) => {\n props.onSelectMicrophone(props.microphones[index ?? 0]);\n }}\n onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Microphone', props)}\n />\n )}\n </>\n );\n\n const speakerDropdown = (\n <Dropdown\n aria-labelledby={'call-composite-local-sound-settings-label'}\n placeholder={hasSpeakers ? defaultPlaceHolder : noSpeakersLabel}\n styles={dropDownStyles(theme)}\n disabled={props.speakers.length === 0}\n options={getDropDownList(props.speakers)}\n defaultSelectedKey={props.selectedSpeaker ? props.selectedSpeaker.id : defaultDeviceId(props.speakers)}\n onChange={(\n event: React.FormEvent<HTMLDivElement>,\n option?: IDropdownOption | undefined,\n index?: number | undefined\n ) => {\n props.onSelectSpeaker(props.speakers[index ?? 0]);\n }}\n onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Speaker', props)}\n />\n );\n\n const SafariBrowserSpeakerDropdownTrampoline = (): JSX.Element => {\n /* @conditional-compile-remove(unsupported-browser) */\n if (isSafariWithNoSpeakers) {\n return <></>;\n }\n return speakerDropdown;\n };\n\n return (\n <Stack data-ui-id=\"call-composite-device-settings\" tokens={mainStackTokens}>\n {roleCanUseCamera && (\n <Stack>\n <Stack horizontal horizontalAlign=\"space-between\" styles={cameraAndVideoEffectsContainerStyleDesktop}>\n <Label\n id={'call-composite-local-camera-settings-label'}\n className={mergeStyles(dropDownStyles(theme).label)}\n disabled={!cameraPermissionGranted} // follows dropdown disabled state\n >\n {cameraLabel}\n </Label>\n {\n /* @conditional-compile-remove(video-background-effects) */\n onResolveVideoEffectDependency && (\n <DefaultButton\n iconProps={{ iconName: 'ConfigurationScreenVideoEffectsButton' }}\n styles={effectsButtonStyles(theme)}\n onClick={props.onClickVideoEffects}\n data-ui-id={'call-config-video-effects-button'}\n >\n {locale.strings.call.configurationPageVideoEffectsButtonLabel}\n </DefaultButton>\n )\n }\n </Stack>\n <ConfigurationPageCameraDropdown\n cameraGrantedDropdown={cameraGrantedDropdown}\n cameraPermissionGranted={cameraPermissionGranted ?? false}\n /* @conditional-compile-remove(call-readiness) */\n dropdownProps={dropdownProps}\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission={props.onClickEnableDevicePermission}\n />\n </Stack>\n )}\n <Stack>\n <Label\n id={'call-composite-local-sound-settings-label'}\n className={mergeStyles(dropDownStyles(theme).label)}\n disabled={!micPermissionGranted} // follows Start button disabled state in ConfigurationPage\n >\n {soundLabel}\n </Label>\n <Stack data-ui-id=\"call-composite-sound-settings\" tokens={soundStackTokens}>\n <ConfigurationPageMicDropdown\n micGrantedDropdown={micGrantedDropdown}\n micPermissionGranted={micPermissionGranted ?? false}\n /* @conditional-compile-remove(call-readiness) */\n dropdownProps={dropdownProps}\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission={props.onClickEnableDevicePermission}\n />\n <SafariBrowserSpeakerDropdownTrampoline />\n </Stack>\n </Stack>\n </Stack>\n );\n};\n\nconst defaultDeviceId = (devices: AudioDeviceInfo[]): string => {\n if (devices.length === 0) {\n return '';\n }\n const defaultDevice = devices.find((device) => device.isSystemDefault);\n if (defaultDevice) {\n return defaultDevice.id;\n }\n return devices[0].id;\n};\n"]}
|
1
|
+
{"version":3,"file":"LocalDeviceSettings.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/LocalDeviceSettings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,QAAQ,EAAmB,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEvF,OAAO,EAAE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BACxE,oBAAC,4BAA4B,IAC3B,kBAAkB,EAAE,kBAAkB,EACtC,oBAAoB,EAAE,oBAAoB,aAApB,oBAAoB,cAApB,oBAAoB,GAAI,KAAK;oBACnD,iDAAiD;oBACjD,aAAa,EAAE,aAAa;oBAC5B,iDAAiD;oBACjD,6BAA6B,EAAE,KAAK,CAAC,6BAA6B,GAClE;gBACF,oBAAC,sCAAsC,OAAG,CACpC,CACF,CACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,OAA0B,EAAU,EAAE;IAC7D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IACvE,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AudioDeviceInfo, VideoDeviceInfo } from '@azure/communication-calling';\nimport { Dropdown, IDropdownOption, Label, mergeStyles, Stack } from '@fluentui/react';\n\nimport { DefaultButton } from '@fluentui/react';\n/* @conditional-compile-remove(call-readiness) */\nimport { useEffect } from 'react';\nimport { useTheme, VideoStreamOptions, _DevicePermissionDropdown } from '@internal/react-components';\nimport React from 'react';\nimport { CallCompositeIcon } from '../../common/icons';\nimport { useLocale } from '../../localization';\nimport {\n dropDownStyles,\n dropDownTitleIconStyles,\n mainStackTokens,\n optionIconStyles,\n soundStackTokens\n} from '../styles/LocalDeviceSettings.styles';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { ConfigurationPageCameraDropdown } from './ConfigurationPageCameraDropdown';\nimport { ConfigurationPageMicDropdown } from './ConfigurationPageMicDropdown';\n/* @conditional-compile-remove(call-readiness) */\nimport { useHandlers } from '../hooks/useHandlers';\nimport { cameraAndVideoEffectsContainerStyleDesktop } from '../styles/CallConfiguration.styles';\n\nimport { effectsButtonStyles } from '../styles/CallConfiguration.styles';\n\ntype iconType = 'Camera' | 'Microphone' | 'Speaker';\n\nconst getDropDownList = (list: Array<VideoDeviceInfo | AudioDeviceInfo>): IDropdownOption[] => {\n // Remove duplicates\n const noDuplicates = new Map<string, VideoDeviceInfo | AudioDeviceInfo>();\n for (const item of list) {\n noDuplicates.set(item.id, item);\n }\n const dropdownList: IDropdownOption[] = [];\n for (const item of noDuplicates.values()) {\n dropdownList.push({\n key: item.id,\n text: item.name === '' ? item.deviceType : item.name\n });\n }\n return dropdownList;\n};\n\nconst getOptionIcon = (type: iconType): JSX.Element | undefined => {\n if (type === 'Camera') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsCamera\" className={optionIconStyles} />;\n } else if (type === 'Microphone') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsMic\" className={optionIconStyles} />;\n } else if (type === 'Speaker') {\n return <CallCompositeIcon iconName=\"LocalDeviceSettingsSpeaker\" className={optionIconStyles} />;\n } else {\n return undefined;\n }\n};\n\nconst onRenderTitle = (iconType: iconType, props?: IDropdownOption[]): JSX.Element => {\n const icon = props && getOptionIcon(iconType);\n return props ? (\n <div className={dropDownTitleIconStyles}>\n {icon}\n <span>{props[0].text}</span>\n </div>\n ) : (\n <></>\n );\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface LocalDeviceSettingsType {\n cameras: VideoDeviceInfo[];\n microphones: AudioDeviceInfo[];\n speakers: AudioDeviceInfo[];\n selectedCamera?: VideoDeviceInfo;\n selectedMicrophone?: AudioDeviceInfo;\n selectedSpeaker?: AudioDeviceInfo;\n microphonePermissionGranted: boolean | undefined;\n cameraPermissionGranted: boolean | undefined;\n onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;\n onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;\n onSelectSpeaker: (device: AudioDeviceInfo) => Promise<void>;\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission?: () => void;\n\n onClickVideoEffects?: () => void;\n}\n\n/**\n * @private\n */\nexport const LocalDeviceSettings = (props: LocalDeviceSettingsType): JSX.Element => {\n const theme = useTheme();\n const locale = useLocale();\n const adapter = useAdapter();\n\n const onResolveVideoEffectDependency = adapter.getState().onResolveVideoEffectDependency;\n const defaultPlaceHolder = locale.strings.call.defaultPlaceHolder;\n const cameraLabel = locale.strings.call.cameraLabel;\n const soundLabel = locale.strings.call.soundLabel;\n const noSpeakersLabel = locale.strings.call.noSpeakersLabel;\n const noCameraLabel = locale.strings.call.noCamerasLabel;\n const noMicLabel = locale.strings.call.noMicrophonesLabel;\n const role = adapter.getState().call?.role;\n\n const cameraPermissionGranted = props.cameraPermissionGranted;\n const micPermissionGranted = props.microphonePermissionGranted;\n\n let roleCanUseCamera = true;\n let roleCanUseMic = true;\n\n roleCanUseCamera = role === 'Consumer' ? false : true;\n roleCanUseMic = role === 'Consumer' ? false : true;\n\n // TODO: speaker permission is tied to microphone permission (when you request 'audio' permission using the SDK) its\n // actually granting access to query both microphone and speaker. However the browser popup asks you explicity for\n // 'microphone'. This needs investigation on how we want to handle this and maybe needs follow up with SDK team.\n /* @conditional-compile-remove(call-readiness) */\n useEffect(() => {\n if (cameraPermissionGranted) {\n adapter.queryCameras();\n }\n if (micPermissionGranted) {\n adapter.queryMicrophones();\n }\n adapter.querySpeakers();\n }, [adapter, cameraPermissionGranted, micPermissionGranted]);\n\n /* @conditional-compile-remove(call-readiness) */\n const dropdownProps = useHandlers(_DevicePermissionDropdown);\n\n const hasCameras = props.cameras.length > 0;\n const hasMicrophones = props.microphones.length > 0;\n const hasSpeakers = props.speakers.length > 0;\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafariWithNoSpeakers =\n adapter.getState().environmentInfo?.environment.browser.toLowerCase() === 'safari' && !hasSpeakers;\n\n const cameraGrantedDropdown = (\n <Dropdown\n data-ui-id=\"call-composite-local-camera-settings\"\n aria-labelledby={'call-composite-local-camera-settings-label'}\n placeholder={hasCameras ? defaultPlaceHolder : noCameraLabel}\n options={cameraPermissionGranted ? getDropDownList(props.cameras) : [{ key: 'deniedOrUnknown', text: '' }]}\n styles={dropDownStyles(theme)}\n disabled={!cameraPermissionGranted || !hasCameras}\n errorMessage={\n props.cameraPermissionGranted === undefined || props.cameraPermissionGranted\n ? undefined\n : locale.strings.call.cameraPermissionDenied\n }\n defaultSelectedKey={\n micPermissionGranted\n ? props.selectedCamera\n ? props.selectedCamera.id\n : props.cameras\n ? props.cameras[0]?.id\n : ''\n : 'deniedOrUnknown'\n }\n onChange={(event, option, index) => {\n props.onSelectCamera(props.cameras[index ?? 0], localVideoViewOptions);\n }}\n onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Camera', props)}\n />\n );\n\n const micGrantedDropdown = (\n <>\n {roleCanUseMic && (\n <Dropdown\n aria-labelledby={'call-composite-local-sound-settings-label'}\n placeholder={hasMicrophones ? defaultPlaceHolder : noMicLabel}\n styles={dropDownStyles(theme)}\n disabled={!micPermissionGranted || !hasMicrophones}\n errorMessage={\n props.microphonePermissionGranted === undefined || props.microphonePermissionGranted\n ? undefined\n : locale.strings.call.microphonePermissionDenied\n }\n options={micPermissionGranted ? getDropDownList(props.microphones) : [{ key: 'deniedOrUnknown', text: '' }]}\n defaultSelectedKey={\n micPermissionGranted\n ? props.selectedMicrophone\n ? props.selectedMicrophone.id\n : defaultDeviceId(props.microphones)\n : 'deniedOrUnknown'\n }\n onChange={(\n event: React.FormEvent<HTMLDivElement>,\n option?: IDropdownOption | undefined,\n index?: number | undefined\n ) => {\n props.onSelectMicrophone(props.microphones[index ?? 0]);\n }}\n onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Microphone', props)}\n />\n )}\n </>\n );\n\n const speakerDropdown = (\n <Dropdown\n aria-labelledby={'call-composite-local-sound-settings-label'}\n placeholder={hasSpeakers ? defaultPlaceHolder : noSpeakersLabel}\n styles={dropDownStyles(theme)}\n disabled={props.speakers.length === 0}\n options={getDropDownList(props.speakers)}\n defaultSelectedKey={props.selectedSpeaker ? props.selectedSpeaker.id : defaultDeviceId(props.speakers)}\n onChange={(\n event: React.FormEvent<HTMLDivElement>,\n option?: IDropdownOption | undefined,\n index?: number | undefined\n ) => {\n props.onSelectSpeaker(props.speakers[index ?? 0]);\n }}\n onRenderTitle={(props?: IDropdownOption[]) => onRenderTitle('Speaker', props)}\n />\n );\n\n const SafariBrowserSpeakerDropdownTrampoline = (): JSX.Element => {\n /* @conditional-compile-remove(unsupported-browser) */\n if (isSafariWithNoSpeakers) {\n return <></>;\n }\n return speakerDropdown;\n };\n\n return (\n <Stack data-ui-id=\"call-composite-device-settings\" tokens={mainStackTokens}>\n {roleCanUseCamera && (\n <Stack>\n <Stack horizontal horizontalAlign=\"space-between\" styles={cameraAndVideoEffectsContainerStyleDesktop}>\n <Label\n id={'call-composite-local-camera-settings-label'}\n className={mergeStyles(dropDownStyles(theme).label)}\n disabled={!cameraPermissionGranted} // follows dropdown disabled state\n >\n {cameraLabel}\n </Label>\n {onResolveVideoEffectDependency && (\n <DefaultButton\n iconProps={{ iconName: 'ConfigurationScreenVideoEffectsButton' }}\n styles={effectsButtonStyles(theme)}\n onClick={props.onClickVideoEffects}\n data-ui-id={'call-config-video-effects-button'}\n >\n {locale.strings.call.configurationPageVideoEffectsButtonLabel}\n </DefaultButton>\n )}\n </Stack>\n <ConfigurationPageCameraDropdown\n cameraGrantedDropdown={cameraGrantedDropdown}\n cameraPermissionGranted={cameraPermissionGranted ?? false}\n /* @conditional-compile-remove(call-readiness) */\n dropdownProps={dropdownProps}\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission={props.onClickEnableDevicePermission}\n />\n </Stack>\n )}\n <Stack>\n <Label\n id={'call-composite-local-sound-settings-label'}\n className={mergeStyles(dropDownStyles(theme).label)}\n disabled={!micPermissionGranted} // follows Start button disabled state in ConfigurationPage\n >\n {soundLabel}\n </Label>\n <Stack data-ui-id=\"call-composite-sound-settings\" tokens={soundStackTokens}>\n <ConfigurationPageMicDropdown\n micGrantedDropdown={micGrantedDropdown}\n micPermissionGranted={micPermissionGranted ?? false}\n /* @conditional-compile-remove(call-readiness) */\n dropdownProps={dropdownProps}\n /* @conditional-compile-remove(call-readiness) */\n onClickEnableDevicePermission={props.onClickEnableDevicePermission}\n />\n <SafariBrowserSpeakerDropdownTrampoline />\n </Stack>\n </Stack>\n </Stack>\n );\n};\n\nconst defaultDeviceId = (devices: AudioDeviceInfo[]): string => {\n if (devices.length === 0) {\n return '';\n }\n const defaultDevice = devices.find((device) => device.isSystemDefault);\n if (defaultDevice) {\n return defaultDevice.id;\n }\n return devices[0].id;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts
CHANGED
@@ -18,6 +18,8 @@ export interface MediaGalleryProps {
|
|
18
18
|
localVideoTileOptions?: boolean | LocalVideoTileOptions;
|
19
19
|
userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';
|
20
20
|
userSetGalleryLayout: VideoGalleryLayout;
|
21
|
+
pinnedParticipants?: string[];
|
22
|
+
setPinnedParticipants?: (pinnedParticipants: string[]) => void;
|
21
23
|
setIsPromptOpen: (isOpen: boolean) => void;
|
22
24
|
setPromptProps: (props: PromptProps) => void;
|
23
25
|
hideSpotlightButtons?: boolean;
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js
CHANGED
@@ -12,7 +12,6 @@ import { useSelector } from '../hooks/useSelector';
|
|
12
12
|
import { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';
|
13
13
|
import { LocalVideoCameraCycleButton } from "../../../../../react-components/src";
|
14
14
|
import { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';
|
15
|
-
/* @conditional-compile-remove(rooms) */
|
16
15
|
import { useAdapter } from '../adapter/CallAdapterProvider';
|
17
16
|
/* @conditional-compile-remove(spotlight) */
|
18
17
|
import { useLocalSpotlightCallbacksWithPrompt, useRemoteSpotlightCallbacksWithPrompt } from '../utils/spotlightUtils';
|
@@ -35,17 +34,16 @@ const remoteVideoViewOptions = {
|
|
35
34
|
*/
|
36
35
|
export const MediaGallery = (props) => {
|
37
36
|
var _a, _b, _c;
|
38
|
-
|
39
|
-
|
37
|
+
const { pinnedParticipants = [], setPinnedParticipants,
|
38
|
+
/* @conditional-compile-remove(spotlight) */ setIsPromptOpen,
|
39
|
+
/* @conditional-compile-remove(spotlight) */ setPromptProps,
|
40
|
+
/* @conditional-compile-remove(spotlight) */ hideSpotlightButtons } = props;
|
40
41
|
const videoGalleryProps = usePropsFor(VideoGallery);
|
41
42
|
const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);
|
42
43
|
const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);
|
43
44
|
const announcerString = useParticipantChangedAnnouncement();
|
44
|
-
/* @conditional-compile-remove(rooms) */
|
45
45
|
const adapter = useAdapter();
|
46
|
-
/* @conditional-compile-remove(rooms) */
|
47
46
|
const userRole = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role;
|
48
|
-
/* @conditional-compile-remove(rooms) */
|
49
47
|
const isRoomsCall = adapter.getState().isRoomsCall;
|
50
48
|
const containerRef = useRef(null);
|
51
49
|
const containerWidth = _useContainerWidth(containerRef);
|
@@ -88,18 +86,32 @@ export const MediaGallery = (props) => {
|
|
88
86
|
const { onStartLocalSpotlightWithPrompt, onStopLocalSpotlightWithPrompt } = useLocalSpotlightCallbacksWithPrompt(onStartLocalSpotlight, onStopLocalSpotlight, setIsPromptOpen, setPromptProps);
|
89
87
|
/* @conditional-compile-remove(spotlight) */
|
90
88
|
const { onStartRemoteSpotlightWithPrompt, onStopRemoteSpotlightWithPrompt } = useRemoteSpotlightCallbacksWithPrompt(onStartRemoteSpotlight, onStopRemoteSpotlight, setIsPromptOpen, setPromptProps);
|
89
|
+
const onPinParticipant = useMemo(() => {
|
90
|
+
return setPinnedParticipants
|
91
|
+
? (userId) => {
|
92
|
+
if (!pinnedParticipants.includes(userId)) {
|
93
|
+
setPinnedParticipants(pinnedParticipants.concat(userId));
|
94
|
+
}
|
95
|
+
}
|
96
|
+
: undefined;
|
97
|
+
}, [setPinnedParticipants, pinnedParticipants]);
|
98
|
+
const onUnpinParticipant = useMemo(() => {
|
99
|
+
return setPinnedParticipants
|
100
|
+
? (userId) => {
|
101
|
+
setPinnedParticipants(pinnedParticipants.filter((participantId) => participantId !== userId));
|
102
|
+
}
|
103
|
+
: undefined;
|
104
|
+
}, [setPinnedParticipants, pinnedParticipants]);
|
91
105
|
const VideoGalleryMemoized = useMemo(() => {
|
92
106
|
const layoutBasedOnUserSelection = () => {
|
93
107
|
return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;
|
94
108
|
return layoutBasedOnTilePosition;
|
95
109
|
};
|
96
|
-
return (React.createElement(VideoGallery, Object.assign({}, videoGalleryProps, { localVideoViewOptions: localVideoViewOptions, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: layoutBasedOnUserSelection(), showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar, remoteVideoTileMenu: remoteVideoTileMenuOptions, overflowGalleryPosition: overflowGalleryPosition,
|
97
|
-
/* @conditional-compile-remove(rooms) */
|
98
|
-
localVideoTileSize: props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')
|
110
|
+
return (React.createElement(VideoGallery, Object.assign({}, videoGalleryProps, { localVideoViewOptions: localVideoViewOptions, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: layoutBasedOnUserSelection(), showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar, remoteVideoTileMenu: remoteVideoTileMenuOptions, overflowGalleryPosition: overflowGalleryPosition, localVideoTileSize: props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')
|
99
111
|
? 'hidden'
|
100
112
|
: props.isMobile && containerAspectRatio < 1
|
101
113
|
? '9:16'
|
102
|
-
: '16:9',
|
114
|
+
: '16:9', pinnedParticipants: pinnedParticipants, onPinParticipant: onPinParticipant, onUnpinParticipant: onUnpinParticipant,
|
103
115
|
/* @conditional-compile-remove(reaction) */
|
104
116
|
reactionResources: reactionResources,
|
105
117
|
/* @conditional-compile-remove(spotlight) */
|
@@ -113,18 +125,18 @@ export const MediaGallery = (props) => {
|
|
113
125
|
}, [
|
114
126
|
videoGalleryProps,
|
115
127
|
props.isMobile,
|
116
|
-
/* @conditional-compile-remove(rooms) */
|
117
128
|
props.localVideoTileOptions,
|
118
129
|
cameraSwitcherProps,
|
119
130
|
onRenderAvatar,
|
120
131
|
remoteVideoTileMenuOptions,
|
121
132
|
overflowGalleryPosition,
|
122
|
-
/* @conditional-compile-remove(rooms) */
|
123
133
|
userRole,
|
124
|
-
/* @conditional-compile-remove(rooms) */
|
125
134
|
isRoomsCall,
|
126
135
|
containerAspectRatio,
|
127
136
|
props.userSetGalleryLayout,
|
137
|
+
pinnedParticipants,
|
138
|
+
onPinParticipant,
|
139
|
+
onUnpinParticipant,
|
128
140
|
layoutBasedOnTilePosition,
|
129
141
|
/* @conditional-compile-remove(reaction) */
|
130
142
|
reactionResources,
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/MediaGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAA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E,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAErF,MAAM,wCAAwC,GAAG,CAAC,gBAAyB,EAAsB,EAAE;IACjG,OAAO,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC;AACxE,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { CSSProperties, useCallback, useMemo } from 'react';\nimport { useRef } from 'react';\nimport {\n VideoGallery,\n VideoStreamOptions,\n CustomAvatarOptions,\n Announcer,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps\n} from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport { _useContainerWidth, _useContainerHeight } from '@internal/react-components';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { AvatarPersona, AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useSelector } from '../hooks/useSelector';\nimport { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';\nimport { LocalVideoCameraCycleButton } from '@internal/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';\nimport { RemoteVideoTileMenuOptions } from '../CallComposite';\nimport { LocalVideoTileOptions } from '../CallComposite';\n/* @conditional-compile-remove(rooms) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(spotlight) */\nimport { PromptProps } from './Prompt';\n/* @conditional-compile-remove(spotlight) */\nimport { useLocalSpotlightCallbacksWithPrompt, useRemoteSpotlightCallbacksWithPrompt } from '../utils/spotlightUtils';\n\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem', // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\nconst remoteVideoViewOptions = {\n scalingMode: 'Crop'\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface MediaGalleryProps {\n isVideoStreamOn?: boolean;\n isMicrophoneChecked?: boolean;\n onStartLocalVideo: () => Promise<void>;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n isMobile?: boolean;\n drawerMenuHostId?: string;\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n localVideoTileOptions?: boolean | LocalVideoTileOptions;\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n userSetGalleryLayout: VideoGalleryLayout;\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen: (isOpen: boolean) => void;\n /* @conditional-compile-remove(spotlight) */\n setPromptProps: (props: PromptProps) => void;\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons?: boolean;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n /* @conditional-compile-remove(spotlight) */\n const { setIsPromptOpen, setPromptProps, hideSpotlightButtons } = props;\n\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n /* @conditional-compile-remove(rooms) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(rooms) */\n const userRole = adapter.getState().call?.role;\n /* @conditional-compile-remove(rooms) */\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;\n /* @conditional-compile-remove(reaction) */\n const reactionResources = adapter.getState().reactions;\n\n const layoutBasedOnTilePosition: VideoGalleryLayout = getVideoGalleryLayoutBasedOnLocalOptions(\n (props.localVideoTileOptions as LocalVideoTileOptions)?.position\n );\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={{ root: { margin: 'auto', maxHeight: '100%' } }}>\n {options?.coinSize && (\n <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />\n )}\n </Stack>\n </Stack>\n );\n },\n [props.onFetchAvatarPersonaData]\n );\n\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden\n ? false\n : props.isMobile\n ? { kind: 'drawer', hostId: props.drawerMenuHostId }\n : { kind: 'contextual' };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n const overflowGalleryPosition = useMemo(() => {\n /* @conditional-compile-remove(overflow-top-composite) */\n if (props.userSetOverflowGalleryPosition === 'horizontalTop') {\n return props.userSetOverflowGalleryPosition;\n }\n return containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9\n ? 'verticalRight'\n : 'horizontalBottom';\n }, [\n /* @conditional-compile-remove(overflow-top-composite) */ props.userSetOverflowGalleryPosition,\n containerWidth,\n containerHeight\n ]);\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartLocalSpotlight, onStopLocalSpotlight, onStartRemoteSpotlight, onStopRemoteSpotlight } =\n videoGalleryProps;\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartLocalSpotlightWithPrompt, onStopLocalSpotlightWithPrompt } = useLocalSpotlightCallbacksWithPrompt(\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n setIsPromptOpen,\n setPromptProps\n );\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartRemoteSpotlightWithPrompt, onStopRemoteSpotlightWithPrompt } = useRemoteSpotlightCallbacksWithPrompt(\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n setIsPromptOpen,\n setPromptProps\n );\n\n const VideoGalleryMemoized = useMemo(() => {\n const layoutBasedOnUserSelection = (): VideoGalleryLayout => {\n return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;\n return layoutBasedOnTilePosition;\n };\n\n return (\n <VideoGallery\n {...videoGalleryProps}\n localVideoViewOptions={localVideoViewOptions}\n remoteVideoViewOptions={remoteVideoViewOptions}\n styles={VideoGalleryStyles}\n layout={layoutBasedOnUserSelection()}\n showCameraSwitcherInLocalPreview={props.isMobile}\n localVideoCameraCycleButtonProps={cameraSwitcherProps}\n onRenderAvatar={onRenderAvatar}\n remoteVideoTileMenu={remoteVideoTileMenuOptions}\n overflowGalleryPosition={overflowGalleryPosition}\n /* @conditional-compile-remove(rooms) */\n localVideoTileSize={\n props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')\n ? 'hidden'\n : props.isMobile && containerAspectRatio < 1\n ? '9:16'\n : '16:9'\n }\n /* @conditional-compile-remove(reaction) */\n reactionResources={reactionResources}\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight={hideSpotlightButtons ? undefined : onStartLocalSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight={hideSpotlightButtons ? undefined : onStopLocalSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight={hideSpotlightButtons ? undefined : onStartRemoteSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight={hideSpotlightButtons ? undefined : onStopRemoteSpotlightWithPrompt}\n />\n );\n }, [\n videoGalleryProps,\n props.isMobile,\n /* @conditional-compile-remove(rooms) */\n props.localVideoTileOptions,\n cameraSwitcherProps,\n onRenderAvatar,\n remoteVideoTileMenuOptions,\n overflowGalleryPosition,\n /* @conditional-compile-remove(rooms) */\n userRole,\n /* @conditional-compile-remove(rooms) */\n isRoomsCall,\n containerAspectRatio,\n\n props.userSetGalleryLayout,\n layoutBasedOnTilePosition,\n /* @conditional-compile-remove(reaction) */\n reactionResources,\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons\n ]);\n\n return (\n <div ref={containerRef} style={mediaGalleryContainerStyles}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </div>\n );\n};\n\nconst mediaGalleryContainerStyles: CSSProperties = { width: '100%', height: '100%' };\n\nconst getVideoGalleryLayoutBasedOnLocalOptions = (localTileOptions?: string): VideoGalleryLayout => {\n return localTileOptions === 'grid' ? 'default' : 'floatingLocalVideo';\n};\n"]}
|
1
|
+
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/MediaGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,YAAY,EAGZ,SAAS,EAGV,4CAAmC;AAEpC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,4CAAmC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAA6B,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sB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AA+B;QAC/B,4CAA4C;QAC5C,8BAA8B;QAC9B,4CAA4C;QAC5C,gCAAgC;QAChC,4CAA4C;QAC5C,+BAA+B;QAC/B,4CAA4C;QAC5C,oBAAoB;KACrB,CAAC,CAAC;IAEH,OAAO,CACL,6BAAK,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,2BAA2B;QACxD,oBAAC,SAAS,IAAC,kBAAkB,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACrE,oBAAoB,CACjB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAErF,MAAM,wCAAwC,GAAG,CAAC,gBAAyB,EAAsB,EAAE;IACjG,OAAO,gBAAgB,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC;AACxE,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { CSSProperties, useCallback, useMemo } from 'react';\nimport { useRef } from 'react';\nimport {\n VideoGallery,\n VideoStreamOptions,\n CustomAvatarOptions,\n Announcer,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps\n} from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport { _useContainerWidth, _useContainerHeight } from '@internal/react-components';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { AvatarPersona, AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useSelector } from '../hooks/useSelector';\nimport { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';\nimport { LocalVideoCameraCycleButton } from '@internal/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';\nimport { RemoteVideoTileMenuOptions } from '../CallComposite';\nimport { LocalVideoTileOptions } from '../CallComposite';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\n/* @conditional-compile-remove(spotlight) */\nimport { PromptProps } from './Prompt';\n/* @conditional-compile-remove(spotlight) */\nimport { useLocalSpotlightCallbacksWithPrompt, useRemoteSpotlightCallbacksWithPrompt } from '../utils/spotlightUtils';\n\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem', // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\nconst remoteVideoViewOptions = {\n scalingMode: 'Crop'\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface MediaGalleryProps {\n isVideoStreamOn?: boolean;\n isMicrophoneChecked?: boolean;\n onStartLocalVideo: () => Promise<void>;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n isMobile?: boolean;\n drawerMenuHostId?: string;\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n localVideoTileOptions?: boolean | LocalVideoTileOptions;\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n userSetGalleryLayout: VideoGalleryLayout;\n pinnedParticipants?: string[];\n setPinnedParticipants?: (pinnedParticipants: string[]) => void;\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen: (isOpen: boolean) => void;\n /* @conditional-compile-remove(spotlight) */\n setPromptProps: (props: PromptProps) => void;\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons?: boolean;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const {\n pinnedParticipants = [],\n setPinnedParticipants,\n /* @conditional-compile-remove(spotlight) */ setIsPromptOpen,\n /* @conditional-compile-remove(spotlight) */ setPromptProps,\n /* @conditional-compile-remove(spotlight) */ hideSpotlightButtons\n } = props;\n\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n const adapter = useAdapter();\n const userRole = adapter.getState().call?.role;\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n const containerAspectRatio = containerWidth && containerHeight ? containerWidth / containerHeight : 0;\n /* @conditional-compile-remove(reaction) */\n const reactionResources = adapter.getState().reactions;\n\n const layoutBasedOnTilePosition: VideoGalleryLayout = getVideoGalleryLayoutBasedOnLocalOptions(\n (props.localVideoTileOptions as LocalVideoTileOptions)?.position\n );\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={{ root: { margin: 'auto', maxHeight: '100%' } }}>\n {options?.coinSize && (\n <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />\n )}\n </Stack>\n </Stack>\n );\n },\n [props.onFetchAvatarPersonaData]\n );\n\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden\n ? false\n : props.isMobile\n ? { kind: 'drawer', hostId: props.drawerMenuHostId }\n : { kind: 'contextual' };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n const overflowGalleryPosition = useMemo(() => {\n /* @conditional-compile-remove(overflow-top-composite) */\n if (props.userSetOverflowGalleryPosition === 'horizontalTop') {\n return props.userSetOverflowGalleryPosition;\n }\n return containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9\n ? 'verticalRight'\n : 'horizontalBottom';\n }, [\n /* @conditional-compile-remove(overflow-top-composite) */ props.userSetOverflowGalleryPosition,\n containerWidth,\n containerHeight\n ]);\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartLocalSpotlight, onStopLocalSpotlight, onStartRemoteSpotlight, onStopRemoteSpotlight } =\n videoGalleryProps;\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartLocalSpotlightWithPrompt, onStopLocalSpotlightWithPrompt } = useLocalSpotlightCallbacksWithPrompt(\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n setIsPromptOpen,\n setPromptProps\n );\n\n /* @conditional-compile-remove(spotlight) */\n const { onStartRemoteSpotlightWithPrompt, onStopRemoteSpotlightWithPrompt } = useRemoteSpotlightCallbacksWithPrompt(\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n setIsPromptOpen,\n setPromptProps\n );\n\n const onPinParticipant = useMemo(() => {\n return setPinnedParticipants\n ? (userId: string) => {\n if (!pinnedParticipants.includes(userId)) {\n setPinnedParticipants(pinnedParticipants.concat(userId));\n }\n }\n : undefined;\n }, [setPinnedParticipants, pinnedParticipants]);\n\n const onUnpinParticipant = useMemo(() => {\n return setPinnedParticipants\n ? (userId: string) => {\n setPinnedParticipants(pinnedParticipants.filter((participantId) => participantId !== userId));\n }\n : undefined;\n }, [setPinnedParticipants, pinnedParticipants]);\n\n const VideoGalleryMemoized = useMemo(() => {\n const layoutBasedOnUserSelection = (): VideoGalleryLayout => {\n return props.localVideoTileOptions ? layoutBasedOnTilePosition : props.userSetGalleryLayout;\n return layoutBasedOnTilePosition;\n };\n\n return (\n <VideoGallery\n {...videoGalleryProps}\n localVideoViewOptions={localVideoViewOptions}\n remoteVideoViewOptions={remoteVideoViewOptions}\n styles={VideoGalleryStyles}\n layout={layoutBasedOnUserSelection()}\n showCameraSwitcherInLocalPreview={props.isMobile}\n localVideoCameraCycleButtonProps={cameraSwitcherProps}\n onRenderAvatar={onRenderAvatar}\n remoteVideoTileMenu={remoteVideoTileMenuOptions}\n overflowGalleryPosition={overflowGalleryPosition}\n localVideoTileSize={\n props.localVideoTileOptions === false || userRole === 'Consumer' || (isRoomsCall && userRole === 'Unknown')\n ? 'hidden'\n : props.isMobile && containerAspectRatio < 1\n ? '9:16'\n : '16:9'\n }\n pinnedParticipants={pinnedParticipants}\n onPinParticipant={onPinParticipant}\n onUnpinParticipant={onUnpinParticipant}\n /* @conditional-compile-remove(reaction) */\n reactionResources={reactionResources}\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight={hideSpotlightButtons ? undefined : onStartLocalSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight={hideSpotlightButtons ? undefined : onStopLocalSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight={hideSpotlightButtons ? undefined : onStartRemoteSpotlightWithPrompt}\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight={hideSpotlightButtons ? undefined : onStopRemoteSpotlightWithPrompt}\n />\n );\n }, [\n videoGalleryProps,\n props.isMobile,\n props.localVideoTileOptions,\n cameraSwitcherProps,\n onRenderAvatar,\n remoteVideoTileMenuOptions,\n overflowGalleryPosition,\n userRole,\n isRoomsCall,\n containerAspectRatio,\n\n props.userSetGalleryLayout,\n pinnedParticipants,\n onPinParticipant,\n onUnpinParticipant,\n layoutBasedOnTilePosition,\n /* @conditional-compile-remove(reaction) */\n reactionResources,\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlightWithPrompt,\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons\n ]);\n\n return (\n <div ref={containerRef} style={mediaGalleryContainerStyles}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </div>\n );\n};\n\nconst mediaGalleryContainerStyles: CSSProperties = { width: '100%', height: '100%' };\n\nconst getVideoGalleryLayoutBasedOnLocalOptions = (localTileOptions?: string): VideoGalleryLayout => {\n return localTileOptions === 'grid' ? 'default' : 'floatingLocalVideo';\n};\n"]}
|
@@ -49,6 +49,10 @@ export interface SpotlightPromptStrings {
|
|
49
49
|
* Heading for prompt when stopping spotlight on local user
|
50
50
|
*/
|
51
51
|
stopSpotlightOnSelfHeading: string;
|
52
|
+
/**
|
53
|
+
* Heading for prompt when stopping all spotlight
|
54
|
+
*/
|
55
|
+
stopAllSpotlightHeading: string;
|
52
56
|
/**
|
53
57
|
* Text for prompt when stopping spotlight on participant
|
54
58
|
*/
|
@@ -58,7 +62,11 @@ export interface SpotlightPromptStrings {
|
|
58
62
|
*/
|
59
63
|
stopSpotlightOnSelfText: string;
|
60
64
|
/**
|
61
|
-
*
|
65
|
+
* Text for prompt when stopping all spotlight
|
66
|
+
*/
|
67
|
+
stopAllSpotlightText: string;
|
68
|
+
/**
|
69
|
+
* Label for button to confirm stopping spotlight on participant(s) in prompt
|
62
70
|
*/
|
63
71
|
stopSpotlightConfirmButtonLabel: string;
|
64
72
|
/**
|
@@ -66,7 +74,7 @@ export interface SpotlightPromptStrings {
|
|
66
74
|
*/
|
67
75
|
stopSpotlightOnSelfConfirmButtonLabel: string;
|
68
76
|
/**
|
69
|
-
* Label for button to cancel stopping spotlight on participant in prompt
|
77
|
+
* Label for button to cancel stopping spotlight on participant(s) in prompt
|
70
78
|
*/
|
71
79
|
stopSpotlightCancelButtonLabel: string;
|
72
80
|
}
|
@@ -18,9 +18,9 @@ export const Prompt = (props) => {
|
|
18
18
|
React.createElement(IconButton, { styles: iconButtonStyles(theme), iconProps: { iconName: 'Cancel' }, onClick: props.onCancel })),
|
19
19
|
React.createElement(Stack, { verticalAlign: "center", className: mergeStyles({ minHeight: '6rem' }) },
|
20
20
|
React.createElement(Text, { className: mergeStyles({ fontSize: '0.875rem' }) }, props.text)),
|
21
|
-
React.createElement(Stack, { horizontal: true,
|
22
|
-
React.createElement(
|
23
|
-
React.createElement(
|
21
|
+
React.createElement(Stack, { horizontal: true, horizontalAlign: "end", tokens: { childrenGap: '0.5rem' } },
|
22
|
+
React.createElement(PrimaryButton, { styles: buttonTextStyles, text: props.confirmButtonLabel, onClick: props.onConfirm }),
|
23
|
+
React.createElement(DefaultButton, { styles: buttonTextStyles, text: props.cancelButtonLabel, onClick: props.onCancel }))));
|
24
24
|
};
|
25
25
|
/* @conditional-compile-remove(spotlight) */
|
26
26
|
const iconButtonStyles = (theme) => ({
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Prompt.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/Prompt.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,4CAA4C;AAC5C,OAAO,EACL,aAAa,EAEb,UAAU,EACV,KAAK,EACL,aAAa,EACb,KAAK,EACL,IAAI,EAEJ,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,4CAA4C;AAC5C,OAAO,EAAE,QAAQ,EAAE,4CAAmC;AACtD,4CAA4C;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,4CAA4C;AAC5C;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAe,EAAE;IACxD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK;QAC7F,oBAAC,KAAK,IAAC,SAAS,EAAE,WAAW,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;YACrD,oBAAC,IAAI,IAAC,SAAS,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,IAAG,KAAK,CAAC,OAAO,CAAQ;YAC9F,oBAAC,UAAU,IAAC,MAAM,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,GAAI,CACrG;QACR,oBAAC,KAAK,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;YACzE,oBAAC,IAAI,IAAC,SAAS,EAAE,WAAW,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,IAAG,KAAK,CAAC,IAAI,CAAQ,CACrE;QACR,oBAAC,KAAK,IAAC,UAAU,QAAC,
|
1
|
+
{"version":3,"file":"Prompt.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/Prompt.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,4CAA4C;AAC5C,OAAO,EACL,aAAa,EAEb,UAAU,EACV,KAAK,EACL,aAAa,EACb,KAAK,EACL,IAAI,EAEJ,WAAW,EACZ,MAAM,iBAAiB,CAAC;AACzB,4CAA4C;AAC5C,OAAO,EAAE,QAAQ,EAAE,4CAAmC;AACtD,4CAA4C;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,4CAA4C;AAC5C;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAkB,EAAe,EAAE;IACxD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,OAAO,CACL,oBAAC,KAAK,IAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,UAAU,EAAE,KAAK;QAC7F,oBAAC,KAAK,IAAC,SAAS,EA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ACX,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,WAAW;KACjC;CACF,CAAC,CAAC;AAEH,4CAA4C;AAC5C,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,CAAC;AAExE,4CAA4C;AAC5C,MAAM,gBAAgB,GAAkB,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(spotlight) */\nimport {\n DefaultButton,\n IButtonStyles,\n IconButton,\n Modal,\n PrimaryButton,\n Stack,\n Text,\n Theme,\n mergeStyles\n} from '@fluentui/react';\n/* @conditional-compile-remove(spotlight) */\nimport { useTheme } from '@internal/react-components';\n/* @conditional-compile-remove(spotlight) */\nimport React from 'react';\n\n/* @conditional-compile-remove(spotlight) */\n/**\n * @private\n */\nexport interface PromptProps {\n isOpen?: boolean;\n onDismiss?: () => void;\n heading?: string;\n text?: string;\n confirmButtonLabel?: string;\n cancelButtonLabel?: string;\n onConfirm?: () => void;\n onCancel?: () => void;\n}\n\n/* @conditional-compile-remove(spotlight) */\n/**\n * @private\n */\nexport const Prompt = (props: PromptProps): JSX.Element => {\n const theme = useTheme();\n\n return (\n <Modal styles={modalStyles} isOpen={props.isOpen} onDismiss={props.onDismiss} isBlocking={false}>\n <Stack className={mergeStyles({ position: 'relative' })}>\n <Text className={mergeStyles({ fontWeight: 600, fontSize: '1.25rem' })}>{props.heading}</Text>\n <IconButton styles={iconButtonStyles(theme)} iconProps={{ iconName: 'Cancel' }} onClick={props.onCancel} />\n </Stack>\n <Stack verticalAlign=\"center\" className={mergeStyles({ minHeight: '6rem' })}>\n <Text className={mergeStyles({ fontSize: '0.875rem' })}>{props.text}</Text>\n </Stack>\n <Stack horizontal horizontalAlign=\"end\" tokens={{ childrenGap: '0.5rem' }}>\n <PrimaryButton styles={buttonTextStyles} text={props.confirmButtonLabel} onClick={props.onConfirm} />\n <DefaultButton styles={buttonTextStyles} text={props.cancelButtonLabel} onClick={props.onCancel} />\n </Stack>\n </Modal>\n );\n};\n\n/* @conditional-compile-remove(spotlight) */\nconst iconButtonStyles = (theme: Theme): IButtonStyles => ({\n root: {\n position: 'absolute',\n top: 0,\n right: 0,\n color: theme.palette.neutralPrimary\n },\n rootHovered: {\n color: theme.palette.neutralDark\n }\n});\n\n/* @conditional-compile-remove(spotlight) */\nconst modalStyles = { main: { padding: '1.5rem ', maxWidth: '30rem' } };\n\n/* @conditional-compile-remove(spotlight) */\nconst buttonTextStyles: IButtonStyles = { label: { fontSize: '0.875rem' } };\n\n/* @conditional-compile-remove(spotlight) */\n/**\n * Strings used in prompt related to spotlight\n * @beta\n */\nexport interface SpotlightPromptStrings {\n /**\n * Heading for prompt when starting spotlight on participant\n */\n startSpotlightHeading: string;\n /**\n * Text for prompt when starting spotlight on participant\n */\n startSpotlightText: string;\n /**\n * Label for button to confirm starting spotlight on local user in prompt\n */\n startSpotlightOnSelfText: string;\n /**\n * Label for button to confirm starting spotlight on participant in prompt\n */\n startSpotlightConfirmButtonLabel: string;\n /**\n * Label for button to cancel starting spotlight on participant in prompt\n */\n startSpotlightCancelButtonLabel: string;\n /**\n * Heading for prompt when stopping spotlight on participant\n */\n stopSpotlightHeading: string;\n /**\n * Heading for prompt when stopping spotlight on local user\n */\n stopSpotlightOnSelfHeading: string;\n /**\n * Heading for prompt when stopping all spotlight\n */\n stopAllSpotlightHeading: string;\n /**\n * Text for prompt when stopping spotlight on participant\n */\n stopSpotlightText: string;\n /**\n * Text for prompt when stopping spotlight on local user\n */\n stopSpotlightOnSelfText: string;\n /**\n * Text for prompt when stopping all spotlight\n */\n stopAllSpotlightText: string;\n /**\n * Label for button to confirm stopping spotlight on participant(s) in prompt\n */\n stopSpotlightConfirmButtonLabel: string;\n /**\n * Label for button to confirm stopping spotlight on local user in prompt\n */\n stopSpotlightOnSelfConfirmButtonLabel: string;\n /**\n * Label for button to cancel stopping spotlight on participant(s) in prompt\n */\n stopSpotlightCancelButtonLabel: string;\n}\n"]}
|
@@ -10,7 +10,6 @@ export interface SidePaneProps {
|
|
10
10
|
disableChatButton?: boolean;
|
11
11
|
onChatButtonClicked?: () => void;
|
12
12
|
onPeopleButtonClicked?: () => void;
|
13
|
-
onHeaderMenuClick?: () => void;
|
14
13
|
}
|
15
14
|
/** @private */
|
16
15
|
export declare const SidePane: (props: SidePaneProps) => JSX.Element;
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js
CHANGED
@@ -35,14 +35,13 @@ export const SidePane = (props) => {
|
|
35
35
|
var _a;
|
36
36
|
return (React.createElement(PeopleAndChatHeader, { onClose: overrideSidePaneId === 'chat' ? (_a = props.onChatButtonClicked) !== null && _a !== void 0 ? _a : noop : closePane, activeTab: (sidePaneRenderer === null || sidePaneRenderer === void 0 ? void 0 : sidePaneRenderer.id) === 'people' ? 'people' : 'chat',
|
37
37
|
// legacy arguments to be removed in breaking change:
|
38
|
-
disablePeopleButton: props.disablePeopleButton, disableChatButton: props.disableChatButton, onPeopleButtonClicked: (sidePaneRenderer === null || sidePaneRenderer === void 0 ? void 0 : sidePaneRenderer.id) === 'people' ? noop : props.onPeopleButtonClicked, onChatButtonClicked: overrideSidePaneId === 'chat' ? noop : props.onChatButtonClicked
|
38
|
+
disablePeopleButton: props.disablePeopleButton, disableChatButton: props.disableChatButton, onPeopleButtonClicked: (sidePaneRenderer === null || sidePaneRenderer === void 0 ? void 0 : sidePaneRenderer.id) === 'people' ? noop : props.onPeopleButtonClicked, onChatButtonClicked: overrideSidePaneId === 'chat' ? noop : props.onChatButtonClicked }));
|
39
39
|
}, [
|
40
40
|
overrideSidePaneId,
|
41
41
|
props.onChatButtonClicked,
|
42
42
|
props.onPeopleButtonClicked,
|
43
43
|
props.disablePeopleButton,
|
44
44
|
props.disableChatButton,
|
45
|
-
props.onHeaderMenuClick,
|
46
45
|
sidePaneRenderer === null || sidePaneRenderer === void 0 ? void 0 : sidePaneRenderer.id,
|
47
46
|
closePane
|
48
47
|
]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SidePane.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/SidePane/SidePane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1G,OAAO,EAAoB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;
|
1
|
+
{"version":3,"file":"SidePane.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/SidePane/SidePane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC1G,OAAO,EAAoB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2B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CAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,QAAQ,CAAA,KAAI,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,0BAA0B,CAAA;wBACzE,CAAC,CAAC,YAAY;wBACd,CAAC,CAAC,2BAA2B;oBAGjC,oBAAC,KAAK,IAAC,MAAM,EAAE,sBAAsB;wBACnC,oBAAC,qBAAqB,OAAG,CACnB,CACG,CACd,CACK,CACG,CACP,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,gEAAgE;AAChE,MAAM,IAAI,GAAG,GAAS,EAAE,GAAE,CAAC,CAAC;AAC5B,MAAM,YAAY,GAAG,GAAgB,EAAE,CAAC,yCAAK,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useMemo } from 'react';\nimport { Stack } from '@fluentui/react';\nimport {\n containerContextStyles,\n paneBodyContainer,\n scrollableContainer,\n scrollableContainerContents\n} from '../../../common/styles/ParticipantContainer.styles';\nimport { availableSpaceStyles, sidePaneStyles, sidePaneTokens } from '../../../common/styles/Pane.styles';\nimport { SidePaneRenderer, useSidePaneContext } from './SidePaneProvider';\nimport { PeopleAndChatHeader } from '../../../common/TabHeader';\nimport { hiddenStyles } from '../../../common/styles/Pane.styles';\n\n/** @private */\nexport interface SidePaneProps {\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileView?: boolean;\n maxWidth?: string;\n minWidth?: string;\n\n // legacy arguments to be removed in breaking change\n disablePeopleButton?: boolean;\n disableChatButton?: boolean;\n onChatButtonClicked?: () => void;\n onPeopleButtonClicked?: () => void;\n}\n\n/** @private */\nexport const SidePane = (props: SidePaneProps): JSX.Element => {\n const { sidePaneRenderer, overrideSidePane } = useSidePaneContext();\n const renderingHiddenOverrideContent =\n overrideSidePane?.renderer.contentRenderer &&\n overrideSidePane.persistRenderingWhenClosed &&\n !overrideSidePane.isActive;\n const renderingOnlyHiddenContent = renderingHiddenOverrideContent && !sidePaneRenderer;\n\n const widthConstrainedStyles = useMemo(\n () => sidePaneStyles(props.maxWidth, props.minWidth),\n [props.maxWidth, props.minWidth]\n );\n const paneStyles = renderingOnlyHiddenContent\n ? hiddenStyles\n : props.mobileView\n ? availableSpaceStyles\n : widthConstrainedStyles;\n\n const Header =\n (overrideSidePane?.isActive ? overrideSidePane.renderer.headerRenderer : sidePaneRenderer?.headerRenderer) ??\n EmptyElement;\n\n /**\n * Legacy code to support old behavior of showing chat and people tab headers on mobile side pane.\n * To be removed in breaking change.\n */\n const overrideSidePaneId = overrideSidePane?.isActive ? overrideSidePane.renderer.id : undefined;\n const { updateSidePaneRenderer } = props;\n const closePane = useCallback(() => {\n updateSidePaneRenderer(undefined);\n }, [updateSidePaneRenderer]);\n\n const LegacyHeader = useMemo((): JSX.Element => {\n return (\n <PeopleAndChatHeader\n onClose={overrideSidePaneId === 'chat' ? props.onChatButtonClicked ?? noop : closePane}\n activeTab={sidePaneRenderer?.id === 'people' ? 'people' : 'chat'}\n // legacy arguments to be removed in breaking change:\n disablePeopleButton={props.disablePeopleButton}\n disableChatButton={props.disableChatButton}\n onPeopleButtonClicked={sidePaneRenderer?.id === 'people' ? noop : props.onPeopleButtonClicked}\n onChatButtonClicked={overrideSidePaneId === 'chat' ? noop : props.onChatButtonClicked}\n />\n );\n }, [\n overrideSidePaneId,\n props.onChatButtonClicked,\n props.onPeopleButtonClicked,\n props.disablePeopleButton,\n props.disableChatButton,\n sidePaneRenderer?.id,\n closePane\n ]);\n\n const HeaderToRender =\n props.mobileView && (overrideSidePaneId === 'chat' || sidePaneRenderer?.id === 'people') ? LegacyHeader : Header();\n\n const ContentRender = overrideSidePane?.isActive ? undefined : sidePaneRenderer?.contentRenderer;\n const OverrideContentRender =\n overrideSidePane?.isActive || overrideSidePane?.persistRenderingWhenClosed\n ? overrideSidePane.renderer.contentRenderer\n : undefined;\n\n if (!ContentRender && !OverrideContentRender) {\n return <EmptyElement />;\n }\n\n return (\n <Stack verticalFill grow styles={paneStyles} data-ui-id=\"SidePane\" tokens={props.mobileView ? {} : sidePaneTokens}>\n {HeaderToRender}\n <Stack.Item verticalFill grow styles={paneBodyContainer}>\n <Stack verticalFill styles={scrollableContainer}>\n {ContentRender && (\n <Stack.Item verticalFill styles={scrollableContainerContents}>\n <Stack styles={containerContextStyles}>\n <ContentRender />\n </Stack>\n </Stack.Item>\n )}\n {OverrideContentRender && (\n <Stack.Item\n verticalFill\n styles={\n !overrideSidePane?.isActive && overrideSidePane?.persistRenderingWhenClosed\n ? hiddenStyles\n : scrollableContainerContents\n }\n >\n <Stack styles={containerContextStyles}>\n <OverrideContentRender />\n </Stack>\n </Stack.Item>\n )}\n </Stack>\n </Stack.Item>\n </Stack>\n );\n};\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nconst noop = (): void => {};\nconst EmptyElement = (): JSX.Element => <></>;\n"]}
|
@@ -47,11 +47,7 @@ export const usePeoplePane = (props) => {
|
|
47
47
|
items: menuItems
|
48
48
|
};
|
49
49
|
}, [onStopAllSpotlight, spotlightedParticipantUserIds, localeStrings.stopAllSpotlightMenuLabel]);
|
50
|
-
const onRenderHeader = useCallback(() => (React.createElement(SidePaneHeader, { onClose: closePane, headingText: localeStrings.peoplePaneTitle, dismissSidePaneButtonAriaLabel: localeStrings.dismissSidePaneButtonLabel, mobileView: mobileView !== null && mobileView !== void 0 ? mobileView : false,
|
51
|
-
/* @conditional-compile-remove(spotlight) */
|
52
|
-
moreSidePaneButtonAriaLabel: localeStrings.peoplePaneMoreButtonAriaLabel,
|
53
|
-
/* @conditional-compile-remove(spotlight) */
|
54
|
-
menuProps: sidePaneHeaderMenuProps })), [mobileView, closePane, localeStrings, /* @conditional-compile-remove(spotlight) */ sidePaneHeaderMenuProps]);
|
50
|
+
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]);
|
55
51
|
/* @conditional-compile-remove(spotlight) */
|
56
52
|
const onFetchParticipantMenuItemsForCallComposite = useCallback((participantId, myUserId, defaultMenuItems) => {
|
57
53
|
const _defaultMenuItems = defaultMenuItems !== null && defaultMenuItems !== void 0 ? defaultMenuItems : [];
|
@@ -133,8 +129,17 @@ export const usePeoplePane = (props) => {
|
|
133
129
|
/* @conditional-compile-remove(spotlight) */
|
134
130
|
_onFetchParticipantMenuItems = onFetchParticipantMenuItemsForCallComposite;
|
135
131
|
const onRenderContent = useCallback(() => {
|
136
|
-
return (React.createElement(PeoplePaneContent, { inviteLink: inviteLink, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: _onFetchParticipantMenuItems, setDrawerMenuItems: setDrawerMenuItems, mobileView: mobileView
|
137
|
-
|
132
|
+
return (React.createElement(PeoplePaneContent, { inviteLink: inviteLink, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: _onFetchParticipantMenuItems, setDrawerMenuItems: setDrawerMenuItems, mobileView: mobileView,
|
133
|
+
/* @conditional-compile-remove(spotlight) */
|
134
|
+
participantListHeadingMoreButtonProps: sidePaneHeaderMenuProps }));
|
135
|
+
}, [
|
136
|
+
inviteLink,
|
137
|
+
mobileView,
|
138
|
+
onFetchAvatarPersonaData,
|
139
|
+
_onFetchParticipantMenuItems,
|
140
|
+
setDrawerMenuItems,
|
141
|
+
/* @conditional-compile-remove(spotlight) */ sidePaneHeaderMenuProps
|
142
|
+
]);
|
138
143
|
const sidePaneRenderer = useMemo(() => ({
|
139
144
|
headerRenderer: onRenderHeader,
|
140
145
|
contentRenderer: onRenderContent,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"usePeoplePane.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AAC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,EACtB,wBAAwB,EAAE,wBAAwB,EAClD,2BAA2B,EAAE,4BAA4B,EACzD,kBAAkB,EAAE,kBAAkB,EACtC,UAAU,EAAE,UAAU,GACtB,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAEzG,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 } 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 } from '@fluentui/react';\n/* @conditional-compile-remove(spotlight) */\nimport { IContextualMenuItem, IContextualMenuProps } from '@fluentui/react';\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 /* @conditional-compile-remove(spotlight) */\n spotlightedParticipantUserIds?: string[];\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight?: () => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight?: () => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n onStopAllSpotlight?: () => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight?: number;\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 /* @conditional-compile-remove(spotlight) */\n spotlightedParticipantUserIds,\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopAllSpotlight,\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight\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\n /* @conditional-compile-remove(spotlight) */\n const sidePaneHeaderMenuProps: IContextualMenuProps = useMemo(() => {\n const menuItems: IContextualMenuItem[] = [];\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 }, [onStopAllSpotlight, spotlightedParticipantUserIds, localeStrings.stopAllSpotlightMenuLabel]);\n\n const onRenderHeader = useCallback(\n () => (\n <SidePaneHeader\n onClose={closePane}\n headingText={localeStrings.peoplePaneTitle}\n dismissSidePaneButtonAriaLabel={localeStrings.dismissSidePaneButtonLabel}\n mobileView={mobileView ?? false}\n /* @conditional-compile-remove(spotlight) */\n moreSidePaneButtonAriaLabel={localeStrings.peoplePaneMoreButtonAriaLabel}\n /* @conditional-compile-remove(spotlight) */\n menuProps={sidePaneHeaderMenuProps}\n />\n ),\n [mobileView, closePane, localeStrings, /* @conditional-compile-remove(spotlight) */ sidePaneHeaderMenuProps]\n );\n\n /* @conditional-compile-remove(spotlight) */\n const onFetchParticipantMenuItemsForCallComposite = useCallback(\n (participantId: string, myUserId?: string, defaultMenuItems?: IContextualMenuItem[]): IContextualMenuItem[] => {\n const _defaultMenuItems: IContextualMenuItem[] = defaultMenuItems ?? [];\n const isSpotlighted = spotlightedParticipantUserIds?.find((p) => p === participantId);\n const isMe = myUserId === participantId;\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 return onFetchParticipantMenuItems\n ? onFetchParticipantMenuItems(participantId, myUserId, _defaultMenuItems)\n : _defaultMenuItems;\n },\n [\n spotlightedParticipantUserIds,\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n onFetchParticipantMenuItems,\n localeStrings.stopSpotlightMenuLabel,\n localeStrings.stopSpotlightOnSelfMenuLabel,\n localeStrings.addSpotlightMenuLabel,\n localeStrings.startSpotlightMenuLabel,\n localeStrings.spotlightLimitReachedMenuTitle,\n maxParticipantsToSpotlight\n ]\n );\n\n let _onFetchParticipantMenuItems = onFetchParticipantMenuItems;\n /* @conditional-compile-remove(spotlight) */\n _onFetchParticipantMenuItems = onFetchParticipantMenuItemsForCallComposite;\n\n const onRenderContent = useCallback((): JSX.Element => {\n return (\n <PeoplePaneContent\n inviteLink={inviteLink}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={_onFetchParticipantMenuItems}\n setDrawerMenuItems={setDrawerMenuItems}\n mobileView={mobileView}\n />\n );\n }, [inviteLink, mobileView, onFetchAvatarPersonaData, _onFetchParticipantMenuItems, setDrawerMenuItems]);\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,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAoB,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,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,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 } 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 } from '@fluentui/react';\n/* @conditional-compile-remove(spotlight) */\nimport { IContextualMenuItem, IContextualMenuProps } from '@fluentui/react';\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 /* @conditional-compile-remove(spotlight) */\n spotlightedParticipantUserIds?: string[];\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight?: () => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight?: () => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n onStopAllSpotlight?: () => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight?: number;\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 /* @conditional-compile-remove(spotlight) */\n spotlightedParticipantUserIds,\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopAllSpotlight,\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight\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\n /* @conditional-compile-remove(spotlight) */\n const sidePaneHeaderMenuProps: IContextualMenuProps = useMemo(() => {\n const menuItems: IContextualMenuItem[] = [];\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 }, [onStopAllSpotlight, spotlightedParticipantUserIds, localeStrings.stopAllSpotlightMenuLabel]);\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 /* @conditional-compile-remove(spotlight) */\n const onFetchParticipantMenuItemsForCallComposite = useCallback(\n (participantId: string, myUserId?: string, defaultMenuItems?: IContextualMenuItem[]): IContextualMenuItem[] => {\n const _defaultMenuItems: IContextualMenuItem[] = defaultMenuItems ?? [];\n const isSpotlighted = spotlightedParticipantUserIds?.find((p) => p === participantId);\n const isMe = myUserId === participantId;\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 return onFetchParticipantMenuItems\n ? onFetchParticipantMenuItems(participantId, myUserId, _defaultMenuItems)\n : _defaultMenuItems;\n },\n [\n spotlightedParticipantUserIds,\n onStartLocalSpotlight,\n onStopLocalSpotlight,\n onStartRemoteSpotlight,\n onStopRemoteSpotlight,\n onFetchParticipantMenuItems,\n localeStrings.stopSpotlightMenuLabel,\n localeStrings.stopSpotlightOnSelfMenuLabel,\n localeStrings.addSpotlightMenuLabel,\n localeStrings.startSpotlightMenuLabel,\n localeStrings.spotlightLimitReachedMenuTitle,\n maxParticipantsToSpotlight\n ]\n );\n\n let _onFetchParticipantMenuItems = onFetchParticipantMenuItems;\n /* @conditional-compile-remove(spotlight) */\n _onFetchParticipantMenuItems = onFetchParticipantMenuItemsForCallComposite;\n\n const onRenderContent = useCallback((): JSX.Element => {\n return (\n <PeoplePaneContent\n inviteLink={inviteLink}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={_onFetchParticipantMenuItems}\n setDrawerMenuItems={setDrawerMenuItems}\n mobileView={mobileView}\n /* @conditional-compile-remove(spotlight) */\n participantListHeadingMoreButtonProps={sidePaneHeaderMenuProps}\n />\n );\n }, [\n inviteLink,\n mobileView,\n onFetchAvatarPersonaData,\n _onFetchParticipantMenuItems,\n setDrawerMenuItems,\n /* @conditional-compile-remove(spotlight) */ sidePaneHeaderMenuProps\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"]}
|
@@ -3,7 +3,6 @@
|
|
3
3
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
4
4
|
import { useIsParticularSidePaneOpen } from './SidePaneProvider';
|
5
5
|
import { SidePaneHeader } from '../../../common/SidePaneHeader';
|
6
|
-
/* @conditional-compile-remove(video-background-effects) */
|
7
6
|
import { useLocale } from '../../../localization';
|
8
7
|
import { VideoEffectsPaneContent } from '../../../common/VideoEffectsPane';
|
9
8
|
/** @private */
|
@@ -17,31 +16,18 @@ export const useVideoEffectsPane = (updateSidePaneRenderer, mobileView, latestEr
|
|
17
16
|
updateSidePaneRenderer(undefined);
|
18
17
|
(_a = cameraButtonRef === null || cameraButtonRef === void 0 ? void 0 : cameraButtonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
19
18
|
}, [cameraButtonRef, updateSidePaneRenderer]);
|
20
|
-
/* @conditional-compile-remove(video-background-effects) */
|
21
19
|
const locale = useLocale();
|
22
20
|
const onRenderHeader = useCallback(() => {
|
23
21
|
var _a, _b;
|
24
|
-
return (React.createElement(SidePaneHeader, { onClose: closePane,
|
25
|
-
|
26
|
-
headingText: locale.strings.call.videoEffectsPaneTitle,
|
27
|
-
/* @conditional-compile-remove(video-background-effects) */
|
28
|
-
dismissSidePaneButtonAriaLabel: (_b = (_a = locale.strings.call.dismissSidePaneButtonLabel) !== null && _a !== void 0 ? _a : locale.strings.callWithChat.dismissSidePaneButtonLabel) !== null && _b !== void 0 ? _b : 'Close', mobileView: mobileView }));
|
29
|
-
}, [closePane, /* @conditional-compile-remove(video-background-effects) */ locale.strings, mobileView]);
|
30
|
-
/* @conditional-compile-remove(video-background-effects) */
|
22
|
+
return (React.createElement(SidePaneHeader, { onClose: closePane, headingText: locale.strings.call.videoEffectsPaneTitle, dismissSidePaneButtonAriaLabel: (_b = (_a = locale.strings.call.dismissSidePaneButtonLabel) !== null && _a !== void 0 ? _a : locale.strings.callWithChat.dismissSidePaneButtonLabel) !== null && _b !== void 0 ? _b : 'Close', mobileView: mobileView }));
|
23
|
+
}, [closePane, locale.strings, mobileView]);
|
31
24
|
const latestVideoEffectError = latestErrors.find((error) => error.type === 'unableToStartVideoEffect');
|
32
25
|
const onRenderContent = useCallback(() => {
|
33
|
-
return (React.createElement(VideoEffectsPaneContent, { onDismissError: onDismissError,
|
34
|
-
/* @conditional-compile-remove(video-background-effects) */
|
35
|
-
activeVideoEffectError: latestVideoEffectError, activeVideoEffectChange: () => {
|
26
|
+
return (React.createElement(VideoEffectsPaneContent, { onDismissError: onDismissError, activeVideoEffectError: latestVideoEffectError, activeVideoEffectChange: () => {
|
36
27
|
// Clear any existing video effects error when the user clicks on a new video effect
|
37
|
-
/* @conditional-compile-remove(video-background-effects) */
|
38
28
|
latestVideoEffectError && (onDismissError === null || onDismissError === void 0 ? void 0 : onDismissError(latestVideoEffectError));
|
39
29
|
} }));
|
40
|
-
}, [
|
41
|
-
/* @conditional-compile-remove(video-background-effects) */
|
42
|
-
latestVideoEffectError,
|
43
|
-
onDismissError
|
44
|
-
]);
|
30
|
+
}, [latestVideoEffectError, onDismissError]);
|
45
31
|
const sidePaneRenderer = useMemo(() => ({
|
46
32
|
headerRenderer: onRenderHeader,
|
47
33
|
contentRenderer: onRenderContent,
|