@azure/communication-react 1.14.1-alpha-202403210013 → 1.14.1-alpha-202403270012
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 +45 -39
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BgK9tOAk.js → RichTextSendBoxWrapper-Yty3fOoA.js} +6 -6
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BgK9tOAk.js.map → RichTextSendBoxWrapper-Yty3fOoA.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-B_kqOVlM.js → index-BEomNZbT.js} +1864 -1452
- package/dist/dist-cjs/communication-react/index-BEomNZbT.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +3 -3
- 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 +11 -14
- 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 +41 -0
- package/dist/dist-esm/react-components/src/components/AttachmentCard.js +108 -0
- 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} +28 -27
- 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 +24 -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 +10 -10
- 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 +6 -6
- 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 +6 -6
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +10 -8
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.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 +6 -6
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +10 -8
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.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 +3 -3
- 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 +21 -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 +55 -30
- 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 +12 -12
- 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 +44 -34
- 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/AttachmentCard.styles.d.ts +9 -0
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js +27 -0
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCard.styles.js.map +1 -0
- 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 +5 -4
- 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 +6 -5
- 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 +16 -13
- 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 +5 -3
- 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 +5 -5
- 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/FluentV9ThemeProvider.js +1 -1
- package/dist/dist-esm/react-components/src/theming/FluentV9ThemeProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +3 -10
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/Attachment.d.ts +151 -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/CallWithChatComposite.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.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 +22 -35
- 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 +8 -8
- 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 +3 -12
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.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 +10 -11
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.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 +22 -22
- 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 +11 -8
- 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/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +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/FileUploadButton.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.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/ChatComposite/hooks/useHandlers.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.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/SendBox.js +8 -8
- package/dist/dist-esm/react-composites/src/composites/common/SendBox.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 +2 -10
- 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 +0 -92
- 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-components/src/components/styles/IconButton.styles.d.ts +0 -5
- package/dist/dist-esm/react-components/src/components/styles/IconButton.styles.js +0 -17
- package/dist/dist-esm/react-components/src/components/styles/IconButton.styles.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":"useVideoEffectsPane.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAoB,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;
|
1
|
+
{"version":3,"file":"useVideoEffectsPane.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAoB,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAI3E,eAAe;AACf,MAAM,CAAC,MAAM,0BAA0B,GAAG,cAAc,CAAC;AAEzD,eAAe;AACf,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,CAAC;A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CAAC;YACrE,CAAC,GACD,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAC,CAAC;IAE7C,MAAM,gBAAgB,GAAqB,OAAO,CAChD,GAAG,EAAE,CAAC,CAAC;QACL,cAAc,EAAE,cAAc;QAC9B,eAAe,EAAE,eAAe;QAChC,EAAE,EAAE,0BAA0B;KAC/B,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,0BAA0B,CAAC,CAAC;IAEvE,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,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;QAClC,IAAI,MAAM,EAAE,CAAC;YACX,SAAS,EAAE,CAAC;QACd,CAAC;aAAM,CAAC;YACN,QAAQ,EAAE,CAAC;QACb,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAElC,OAAO;QACL,oBAAoB,EAAE,QAAQ;QAC9B,qBAAqB,EAAE,SAAS;QAChC,sBAAsB,EAAE,UAAU;QAClC,sBAAsB,EAAE,MAAM;KAC/B,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { SidePaneRenderer, useIsParticularSidePaneOpen } from './SidePaneProvider';\nimport { SidePaneHeader } from '../../../common/SidePaneHeader';\n\nimport { useLocale } from '../../../localization';\nimport { VideoEffectsPaneContent } from '../../../common/VideoEffectsPane';\nimport { ActiveErrorMessage } from '@internal/react-components';\nimport { IButton } from '@fluentui/react';\n\n/** @private */\nexport const VIDEO_EFFECTS_SIDE_PANE_ID = 'videoeffects';\n\n/** @private */\nexport const VIDEO_EFFECTS_SIDE_PANE_WIDTH_REM = 17.5;\n\n/** @private */\nexport const useVideoEffectsPane = (\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void,\n mobileView: boolean,\n latestErrors: ActiveErrorMessage[],\n onDismissError: (error: ActiveErrorMessage) => void,\n cameraButtonRef?: React.RefObject<IButton>\n): {\n openVideoEffectsPane: () => void;\n closeVideoEffectsPane: () => void;\n toggleVideoEffectsPane: () => void;\n isVideoEffectsPaneOpen: boolean;\n} => {\n const closePane = useCallback(() => {\n updateSidePaneRenderer(undefined);\n cameraButtonRef?.current?.focus();\n }, [cameraButtonRef, updateSidePaneRenderer]);\n\n const locale = useLocale();\n\n const onRenderHeader = useCallback(() => {\n return (\n <SidePaneHeader\n onClose={closePane}\n headingText={locale.strings.call.videoEffectsPaneTitle}\n dismissSidePaneButtonAriaLabel={\n locale.strings.call.dismissSidePaneButtonLabel ??\n locale.strings.callWithChat.dismissSidePaneButtonLabel ??\n 'Close'\n }\n mobileView={mobileView}\n />\n );\n }, [closePane, locale.strings, mobileView]);\n\n const latestVideoEffectError = latestErrors.find((error) => error.type === 'unableToStartVideoEffect');\n\n const onRenderContent = useCallback((): JSX.Element => {\n return (\n <VideoEffectsPaneContent\n onDismissError={onDismissError}\n activeVideoEffectError={latestVideoEffectError}\n activeVideoEffectChange={() => {\n // Clear any existing video effects error when the user clicks on a new video effect\n\n latestVideoEffectError && onDismissError?.(latestVideoEffectError);\n }}\n />\n );\n }, [latestVideoEffectError, onDismissError]);\n\n const sidePaneRenderer: SidePaneRenderer = useMemo(\n () => ({\n headerRenderer: onRenderHeader,\n contentRenderer: onRenderContent,\n id: VIDEO_EFFECTS_SIDE_PANE_ID\n }),\n [onRenderContent, onRenderHeader]\n );\n\n const openPane = useCallback(() => {\n updateSidePaneRenderer(sidePaneRenderer);\n }, [sidePaneRenderer, updateSidePaneRenderer]);\n\n const isOpen = useIsParticularSidePaneOpen(VIDEO_EFFECTS_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 const togglePane = useCallback(() => {\n if (isOpen) {\n closePane();\n } else {\n openPane();\n }\n }, [closePane, isOpen, openPane]);\n\n return {\n openVideoEffectsPane: openPane,\n closeVideoEffectsPane: closePane,\n toggleVideoEffectsPane: togglePane,\n isVideoEffectsPaneOpen: isOpen\n };\n};\n\n/**\n * Active video effect with timestamp.\n *\n * @private\n */\nexport interface ActiveVideoEffect {\n /**\n * Type of video effect that is active.\n */\n type: 'blur' | 'replacement';\n /**\n * The latest timestamp when this effect was activated.\n *\n */\n timestamp: Date;\n}\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js
CHANGED
@@ -6,7 +6,6 @@ import { _HighContrastAwareIcon } from "../../../../../../react-components/src";
|
|
6
6
|
import React, { useMemo } from 'react';
|
7
7
|
import { usePropsFor } from '../../hooks/usePropsFor';
|
8
8
|
import { concatButtonBaseStyles } from '../../styles/Buttons.styles';
|
9
|
-
/* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */
|
10
9
|
import { useAdapter } from '../../adapter/CallAdapterProvider';
|
11
10
|
/**
|
12
11
|
* @private
|
@@ -15,20 +14,14 @@ export const Camera = (props) => {
|
|
15
14
|
var _a, _b, _c;
|
16
15
|
const cameraButtonProps = usePropsFor(CameraButton);
|
17
16
|
const styles = useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
18
|
-
/* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */
|
19
17
|
const adapter = useAdapter();
|
20
|
-
/* @conditional-compile-remove(rooms) */
|
21
18
|
const isRoomsCall = adapter.getState().isRoomsCall;
|
22
19
|
/* @conditional-compile-remove(capabilities) */
|
23
20
|
const turnVideoOnCapability = (_b = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities.turnVideoOn;
|
24
|
-
return (React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-camera-button" }, cameraButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disableTooltip: props.disableTooltip, disabled: cameraButtonProps.disabled ||
|
25
|
-
props.disabled ||
|
26
|
-
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'),
|
21
|
+
return (React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-camera-button" }, cameraButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disableTooltip: props.disableTooltip, disabled: cameraButtonProps.disabled || props.disabled || (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'),
|
27
22
|
/* @conditional-compile-remove(capabilities) */
|
28
23
|
onRenderOffIcon: turnVideoOnCapability && !turnVideoOnCapability.isPresent
|
29
24
|
? () => React.createElement(_HighContrastAwareIcon, { disabled: true, iconName: 'ControlButtonCameraProhibited' })
|
30
|
-
: undefined,
|
31
|
-
/* @conditional-compile-remove(video-background-effects) */
|
32
|
-
onClickVideoEffects: props.onClickVideoEffects, componentRef: props.componentRef })));
|
25
|
+
: undefined, onClickVideoEffects: props.onClickVideoEffects, componentRef: props.componentRef })));
|
33
26
|
};
|
34
27
|
//# sourceMappingURL=Camera.js.map
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Camera.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAA0B,+CAAmC;AAClF,+CAA+C;AAC/C,OAAO,EAAE,sBAAsB,EAAE,+CAAmC;AACpE,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,
|
1
|
+
{"version":3,"file":"Camera.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Camera.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAA0B,+CAAmC;AAClF,+CAA+C;AAC/C,OAAO,EAAE,sBAAsB,EAAE,+CAAmC;AACpE,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAG/D;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAStB,EAAe,EAAE;;IAChB,MAAM,iBAAiB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,WAAC,OAAA,sBAAsB,CAAC,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CAAC,CAAA,EAAA,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACzF,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC;IAEnD,+CAA+C;IAC/C,MAAM,qBAAqB,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,0CAAE,mBAAmB,0CAAE,YAAY,CAAC,WAAW,CAAC;IAErG,OAAO,CACL,oBAAC,YAAY,gCACA,8BAA8B,IACrC,iBAAiB,IACrB,SAAS,EAAE,KAAK,CAAC,WAAW,KAAK,SAAS,EAC1C,MAAM,EAAE,MAAM,EACd,yBAAyB,EAAE,KAAK,CAAC,8BAA8B,EAC/D,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,QAAQ,EACN,iBAAiB,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,IAAI,CAAC,WAAW,IAAI,CAAA,MAAA,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,0CAAE,IAAI,MAAK,SAAS,CAAC;QAE9G,+CAA+C;QAC/C,eAAe,EACb,qBAAqB,IAAI,CAAC,qBAAqB,CAAC,SAAS;YACvD,CAAC,CAAC,GAAG,EAAE,CAAC,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,+BAA+B,GAAI;YAC7F,CAAC,CAAC,SAAS,EAEf,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAC9C,YAAY,EAAE,KAAK,CAAC,YAAY,IAChC,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CameraButton, ControlBarButtonStyles } from '@internal/react-components';\n/* @conditional-compile-remove(capabilities) */\nimport { _HighContrastAwareIcon } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlDisplayType } from '../../../common/types/CommonCallControlOptions';\nimport { usePropsFor } from '../../hooks/usePropsFor';\nimport { concatButtonBaseStyles } from '../../styles/Buttons.styles';\nimport { useAdapter } from '../../adapter/CallAdapterProvider';\nimport { IButton } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const Camera = (props: {\n displayType?: CallControlDisplayType;\n styles?: ControlBarButtonStyles;\n splitButtonsForDeviceSelection?: boolean;\n disabled?: boolean;\n\n onClickVideoEffects?: (showVideoEffects: boolean) => void;\n componentRef?: React.RefObject<IButton>;\n disableTooltip?: boolean;\n}): JSX.Element => {\n const cameraButtonProps = usePropsFor(CameraButton);\n const styles = useMemo(() => concatButtonBaseStyles(props.styles ?? {}), [props.styles]);\n const adapter = useAdapter();\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n /* @conditional-compile-remove(capabilities) */\n const turnVideoOnCapability = adapter.getState().call?.capabilitiesFeature?.capabilities.turnVideoOn;\n\n return (\n <CameraButton\n data-ui-id=\"call-composite-camera-button\"\n {...cameraButtonProps}\n showLabel={props.displayType !== 'compact'}\n styles={styles}\n enableDeviceSelectionMenu={props.splitButtonsForDeviceSelection}\n disableTooltip={props.disableTooltip}\n disabled={\n cameraButtonProps.disabled || props.disabled || (isRoomsCall && adapter.getState().call?.role === 'Unknown')\n }\n /* @conditional-compile-remove(capabilities) */\n onRenderOffIcon={\n turnVideoOnCapability && !turnVideoOnCapability.isPresent\n ? () => <_HighContrastAwareIcon disabled={true} iconName={'ControlButtonCameraProhibited'} />\n : undefined\n }\n onClickVideoEffects={props.onClickVideoEffects}\n componentRef={props.componentRef}\n />\n );\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js
CHANGED
@@ -4,37 +4,22 @@ import { DevicesButton } from "../../../../../../react-components/src";
|
|
4
4
|
import React, { useMemo } from 'react';
|
5
5
|
import { usePropsFor } from '../../hooks/usePropsFor';
|
6
6
|
import { concatButtonBaseStyles, devicesButtonWithIncreasedTouchTargets } from '../../styles/Buttons.styles';
|
7
|
-
/* @conditional-compile-remove(rooms) */
|
8
7
|
import { useLocale } from '../../../localization';
|
9
8
|
import { _HighContrastAwareIcon } from "../../../../../../react-components/src";
|
10
|
-
/* @conditional-compile-remove(rooms) */
|
11
9
|
import { useAdapter } from '../../adapter/CallAdapterProvider';
|
12
10
|
/** @private */
|
13
11
|
export const Devices = (props) => {
|
14
12
|
var _a, _b;
|
15
13
|
const devicesButtonProps = usePropsFor(DevicesButton);
|
16
|
-
/* @conditional-compile-remove(rooms) */
|
17
14
|
const adapter = useAdapter();
|
18
|
-
/* @conditional-compile-remove(rooms) */
|
19
15
|
const role = (_b = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) !== null && _b !== void 0 ? _b : 'Unknown';
|
20
|
-
const augmentedDeviceButtonProps = useMemo(() => (Object.assign(Object.assign({}, devicesButtonProps), {
|
21
|
-
/* @conditional-compile-remove(rooms) */
|
22
|
-
microphones: role === 'Consumer' ? [] : devicesButtonProps.microphones,
|
23
|
-
/* @conditional-compile-remove(rooms) */
|
24
|
-
cameras: role === 'Consumer' ? [] : devicesButtonProps.cameras })), [
|
25
|
-
devicesButtonProps,
|
26
|
-
/* @conditional-compile-remove(rooms) */
|
27
|
-
role
|
28
|
-
]);
|
16
|
+
const augmentedDeviceButtonProps = useMemo(() => (Object.assign(Object.assign({}, devicesButtonProps), { microphones: role === 'Consumer' ? [] : devicesButtonProps.microphones, cameras: role === 'Consumer' ? [] : devicesButtonProps.cameras })), [devicesButtonProps, role]);
|
29
17
|
const styles = useMemo(() => {
|
30
18
|
var _a;
|
31
19
|
return concatButtonBaseStyles(props.increaseFlyoutItemSize ? devicesButtonWithIncreasedTouchTargets : {}, (_a = props.styles) !== null && _a !== void 0 ? _a : {});
|
32
20
|
}, [props.increaseFlyoutItemSize, props.styles]);
|
33
|
-
/* @conditional-compile-remove(rooms) */
|
34
21
|
const locale = useLocale();
|
35
|
-
/* @conditional-compile-remove(rooms) */
|
36
22
|
const onlyManageSpeakers = role === 'Consumer';
|
37
|
-
/* @conditional-compile-remove(rooms) */
|
38
23
|
const onRenderDevicesIcon = () => {
|
39
24
|
return React.createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "OptionsSpeaker" });
|
40
25
|
};
|
@@ -42,13 +27,8 @@ export const Devices = (props) => {
|
|
42
27
|
/* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
|
43
28
|
, Object.assign({
|
44
29
|
/* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */
|
45
|
-
persistMenu: true }, augmentedDeviceButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled,
|
46
|
-
/* @conditional-compile-remove(rooms) */
|
47
|
-
strings: getLabelFromRole(role, locale),
|
48
|
-
/* @conditional-compile-remove(rooms) */
|
49
|
-
onRenderIcon: onlyManageSpeakers ? onRenderDevicesIcon : undefined })));
|
30
|
+
persistMenu: true }, augmentedDeviceButtonProps, { showLabel: props.displayType !== 'compact', styles: styles, "data-ui-id": "calling-composite-devices-button", disabled: props.disabled, strings: getLabelFromRole(role, locale), onRenderIcon: onlyManageSpeakers ? onRenderDevicesIcon : undefined })));
|
50
31
|
};
|
51
|
-
/* @conditional-compile-remove(rooms) */
|
52
32
|
const getLabelFromRole = (role, locale) => {
|
53
33
|
if (role === 'Consumer') {
|
54
34
|
return { label: locale.component.strings.microphoneButton.speakerMenuTitle };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Devices.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Devices.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAA0B,aAAa,EAAE,+CAAmC;
|
1
|
+
{"version":3,"file":"Devices.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Devices.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAA0B,aAAa,EAAE,+CAAmC;AAEnF,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;A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AE;QAC5C,OAAO,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAC,gBAAgB,GAAG,CAAC;IACxF,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,aAAa;IACZ,8HAA8H;;QAA9H,8HAA8H;QAC9H,WAAW,EAAE,IAAI,IACb,0BAA0B,IAC9B,SAAS,EAAE,KAAK,CAAC,WAAW,KAAK,SAAS,EAC1C,MAAM,EAAE,MAAM,gBACH,kCAAkC,EAC7C,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,OAAO,EAAE,gBAAgB,CAAC,IAAuB,EAAE,MAAM,CAAC,EAC1D,YAAY,EAAE,kBAAkB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,IAClE,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,CACvB,IAAqB,EACrB,MAAuB,EACoB,EAAE;IAC7C,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;QACxB,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC;IAC/E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ControlBarButtonStyles, DevicesButton } from '@internal/react-components';\nimport { DevicesButtonStrings } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { usePropsFor } from '../../hooks/usePropsFor';\nimport { concatButtonBaseStyles, devicesButtonWithIncreasedTouchTargets } from '../../styles/Buttons.styles';\nimport { CompositeLocale, useLocale } from '../../../localization';\nimport { _HighContrastAwareIcon } from '@internal/react-components';\nimport { CallControlDisplayType } from '../../../common/types/CommonCallControlOptions';\nimport { useAdapter } from '../../adapter/CallAdapterProvider';\nimport { ParticipantRole } from '@azure/communication-calling';\n\n/** @private */\nexport const Devices = (props: {\n displayType?: CallControlDisplayType;\n increaseFlyoutItemSize?: boolean;\n styles?: ControlBarButtonStyles;\n disabled?: boolean;\n}): JSX.Element => {\n const devicesButtonProps = usePropsFor(DevicesButton);\n const adapter = useAdapter();\n const role: ParticipantRole = adapter.getState().call?.role ?? 'Unknown';\n\n const augmentedDeviceButtonProps = useMemo(\n () => ({\n ...devicesButtonProps,\n microphones: role === 'Consumer' ? [] : devicesButtonProps.microphones,\n cameras: role === 'Consumer' ? [] : devicesButtonProps.cameras\n }),\n [devicesButtonProps, role]\n );\n const styles = useMemo(\n () =>\n concatButtonBaseStyles(\n props.increaseFlyoutItemSize ? devicesButtonWithIncreasedTouchTargets : {},\n props.styles ?? {}\n ),\n [props.increaseFlyoutItemSize, props.styles]\n );\n const locale = useLocale();\n const onlyManageSpeakers = role === 'Consumer';\n\n const onRenderDevicesIcon = (): JSX.Element => {\n return <_HighContrastAwareIcon disabled={props.disabled} iconName=\"OptionsSpeaker\" />;\n };\n\n return (\n <DevicesButton\n /* By setting `persistMenu?` to true, we prevent options menu from getting hidden every time a participant joins or leaves. */\n persistMenu={true}\n {...augmentedDeviceButtonProps}\n showLabel={props.displayType !== 'compact'}\n styles={styles}\n data-ui-id=\"calling-composite-devices-button\"\n disabled={props.disabled}\n strings={getLabelFromRole(role as ParticipantRole, locale)}\n onRenderIcon={onlyManageSpeakers ? onRenderDevicesIcon : undefined}\n />\n );\n};\n\nconst getLabelFromRole = (\n role: ParticipantRole,\n locale: CompositeLocale\n): Partial<DevicesButtonStrings> | undefined => {\n if (role === 'Consumer') {\n return { label: locale.component.strings.microphoneButton.speakerMenuTitle };\n }\n return undefined;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js
CHANGED
@@ -8,7 +8,6 @@ import { usePropsFor } from '../../hooks/usePropsFor';
|
|
8
8
|
import { useSelector } from '../../hooks/useSelector';
|
9
9
|
import { getCallStatus, getLocalMicrophoneEnabled } from '../../selectors/baseSelectors';
|
10
10
|
import { concatButtonBaseStyles } from '../../styles/Buttons.styles';
|
11
|
-
/* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */
|
12
11
|
import { useAdapter } from '../../adapter/CallAdapterProvider';
|
13
12
|
/**
|
14
13
|
* @private
|
@@ -18,9 +17,7 @@ export const Microphone = (props) => {
|
|
18
17
|
const microphoneButtonProps = usePropsFor(MicrophoneButton);
|
19
18
|
const callStatus = useSelector(getCallStatus);
|
20
19
|
const isLocalMicrophoneEnabled = useSelector(getLocalMicrophoneEnabled);
|
21
|
-
/* @conditional-compile-remove(rooms) */ /* @conditional-compile-remove(capabilities) */
|
22
20
|
const adapter = useAdapter();
|
23
|
-
/* @conditional-compile-remove(rooms) */
|
24
21
|
const isRoomsCall = adapter.getState().isRoomsCall;
|
25
22
|
/* @conditional-compile-remove(capabilities) */
|
26
23
|
const unmuteMicCapability = (_b = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities.unmuteMic;
|
@@ -35,9 +32,7 @@ export const Microphone = (props) => {
|
|
35
32
|
}
|
36
33
|
const styles = useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
37
34
|
// tab focus on MicrophoneButton on page load
|
38
|
-
return (React.createElement(MicrophoneButton, Object.assign({ "data-ui-id": "call-composite-microphone-button" }, microphoneButtonProps, { showLabel: props.displayType !== 'compact', disableTooltip: props.disableTooltip, styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: microphoneButtonProps.disabled ||
|
39
|
-
props.disabled ||
|
40
|
-
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'),
|
35
|
+
return (React.createElement(MicrophoneButton, Object.assign({ "data-ui-id": "call-composite-microphone-button" }, microphoneButtonProps, { showLabel: props.displayType !== 'compact', disableTooltip: props.disableTooltip, styles: styles, enableDeviceSelectionMenu: props.splitButtonsForDeviceSelection, disabled: microphoneButtonProps.disabled || props.disabled || (isRoomsCall && ((_c = adapter.getState().call) === null || _c === void 0 ? void 0 : _c.role) === 'Unknown'),
|
41
36
|
/* @conditional-compile-remove(capabilities) */
|
42
37
|
onRenderOffIcon: unmuteMicCapability && !unmuteMicCapability.isPresent
|
43
38
|
? () => React.createElement(_HighContrastAwareIcon, { disabled: true, iconName: 'ControlButtonMicProhibited' })
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Microphone.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Microphone.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAA0B,gBAAgB,EAAE,+CAAmC;AACtF,+CAA+C;AAC/C,OAAO,EAAE,sBAAsB,EAAE,+CAAmC;AACpE,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,
|
1
|
+
{"version":3,"file":"Microphone.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/Microphone.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAA0B,gBAAgB,EAAE,+CAAmC;AACtF,+CAA+C;AAC/C,OAAO,EAAE,sBAAsB,EAAE,+CAAmC;AACpE,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,yBA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AC/D,QAAQ,EACN,qBAAqB,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,IAAI,CAAC,WAAW,IAAI,CAAA,MAAA,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,0CAAE,IAAI,MAAK,SAAS,CAAC;QAElH,+CAA+C;QAC/C,eAAe,EACb,mBAAmB,IAAI,CAAC,mBAAmB,CAAC,SAAS;YACnD,CAAC,CAAC,GAAG,EAAE,CAAC,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,4BAA4B,GAAI;YAC1F,CAAC,CAAC,SAAS,IAEf,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBarButtonStyles, MicrophoneButton } from '@internal/react-components';\n/* @conditional-compile-remove(capabilities) */\nimport { _HighContrastAwareIcon } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlDisplayType } from '../../../common/types/CommonCallControlOptions';\nimport { usePropsFor } from '../../hooks/usePropsFor';\nimport { useSelector } from '../../hooks/useSelector';\nimport { getCallStatus, getLocalMicrophoneEnabled } from '../../selectors/baseSelectors';\nimport { concatButtonBaseStyles } from '../../styles/Buttons.styles';\nimport { useAdapter } from '../../adapter/CallAdapterProvider';\n\n/**\n * @private\n */\nexport const Microphone = (props: {\n displayType?: CallControlDisplayType;\n styles?: ControlBarButtonStyles;\n splitButtonsForDeviceSelection?: boolean;\n disabled?: boolean;\n disableTooltip?: boolean;\n}): JSX.Element => {\n const microphoneButtonProps = usePropsFor(MicrophoneButton);\n const callStatus = useSelector(getCallStatus);\n const isLocalMicrophoneEnabled = useSelector(getLocalMicrophoneEnabled);\n const adapter = useAdapter();\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n /* @conditional-compile-remove(capabilities) */\n const unmuteMicCapability = adapter.getState().call?.capabilitiesFeature?.capabilities.unmuteMic;\n\n /**\n * When call is in connecting state, microphone button should be disabled.\n * This is due to to headless limitation where a call can not be muted/unmuted in lobby.\n */\n if (callStatus === 'Connecting') {\n // Lobby page should show the microphone status that was set on the local preview/configuration\n // page until the user successfully joins the call.\n microphoneButtonProps.checked = isLocalMicrophoneEnabled;\n }\n const styles = useMemo(() => concatButtonBaseStyles(props.styles ?? {}), [props.styles]);\n // tab focus on MicrophoneButton on page load\n return (\n <MicrophoneButton\n data-ui-id=\"call-composite-microphone-button\"\n {...microphoneButtonProps}\n showLabel={props.displayType !== 'compact'}\n disableTooltip={props.disableTooltip}\n styles={styles}\n enableDeviceSelectionMenu={props.splitButtonsForDeviceSelection}\n disabled={\n microphoneButtonProps.disabled || props.disabled || (isRoomsCall && adapter.getState().call?.role === 'Unknown')\n }\n /* @conditional-compile-remove(capabilities) */\n onRenderOffIcon={\n unmuteMicCapability && !unmuteMicCapability.isPresent\n ? () => <_HighContrastAwareIcon disabled={true} iconName={'ControlButtonMicProhibited'} />\n : undefined\n }\n />\n );\n};\n"]}
|
@@ -4,16 +4,13 @@ import { ScreenShareButton } from "../../../../../../react-components/src";
|
|
4
4
|
import React, { useMemo } from 'react';
|
5
5
|
import { usePropsFor } from '../../hooks/usePropsFor';
|
6
6
|
import { concatButtonBaseStyles } from '../../styles/Buttons.styles';
|
7
|
-
/* @conditional-compile-remove(rooms) */
|
8
7
|
import { useAdapter } from '../../adapter/CallAdapterProvider';
|
9
8
|
/** @private */
|
10
9
|
export const ScreenShare = (props) => {
|
11
10
|
var _a;
|
12
11
|
const screenShareButtonProps = usePropsFor(ScreenShareButton);
|
13
12
|
const styles = useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
|
14
|
-
/* @conditional-compile-remove(rooms) */
|
15
13
|
const adapter = useAdapter();
|
16
|
-
/* @conditional-compile-remove(rooms) */
|
17
14
|
const isRoomsCall = adapter.getState().isRoomsCall;
|
18
15
|
const screenShareButtonDisabled = () => {
|
19
16
|
var _a;
|
@@ -21,9 +18,7 @@ export const ScreenShare = (props) => {
|
|
21
18
|
return (_a = screenShareButtonProps === null || screenShareButtonProps === void 0 ? void 0 : screenShareButtonProps.disabled) !== null && _a !== void 0 ? _a : isDisabled(props.option);
|
22
19
|
return isDisabled(props.option);
|
23
20
|
};
|
24
|
-
return (React.createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, { showLabel: props.displayType !== 'compact', disabled: screenShareButtonDisabled() ||
|
25
|
-
props.disabled ||
|
26
|
-
/* @conditional-compile-remove(rooms) */ (isRoomsCall && ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) === 'Unknown'), styles: styles })));
|
21
|
+
return (React.createElement(ScreenShareButton, Object.assign({ "data-ui-id": "call-composite-screenshare-button" }, screenShareButtonProps, { showLabel: props.displayType !== 'compact', disabled: screenShareButtonDisabled() || props.disabled || (isRoomsCall && ((_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role) === 'Unknown'), styles: styles })));
|
27
22
|
};
|
28
23
|
const isDisabled = (option) => {
|
29
24
|
if (option === undefined || option === true || option === false) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ScreenShare.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/ScreenShare.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAA0B,iBAAiB,EAAE,+CAAmC;AACvF,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,
|
1
|
+
{"version":3,"file":"ScreenShare.js","sourceRoot":"","sources":["../../../../../../../../../react-composites/src/composites/CallComposite/components/buttons/ScreenShare.tsx"],"names":[],"mappings":"AAAA,uCAAuC;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AAC,EAE/G,MAAM,EAAE,MAAM,IACd,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,MAAwC,EAAW,EAAE;IACvE,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QAChE,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ControlBarButtonStyles, ScreenShareButton } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlDisplayType } from '../../../common/types/CommonCallControlOptions';\nimport { usePropsFor } from '../../hooks/usePropsFor';\nimport { concatButtonBaseStyles } from '../../styles/Buttons.styles';\nimport { useAdapter } from '../../adapter/CallAdapterProvider';\n\n/** @private */\nexport const ScreenShare = (props: {\n // The value of `CallControlOptions.screenShareButton`.\n option?: boolean | { disabled: boolean };\n displayType?: CallControlDisplayType;\n styles?: ControlBarButtonStyles;\n disabled?: boolean;\n}): JSX.Element => {\n const screenShareButtonProps = usePropsFor(ScreenShareButton);\n const styles = useMemo(() => concatButtonBaseStyles(props.styles ?? {}), [props.styles]);\n const adapter = useAdapter();\n const isRoomsCall = adapter.getState().isRoomsCall;\n\n const screenShareButtonDisabled = (): boolean => {\n /* @conditional-compile-remove(capabilities) */ /* @conditional-compile-remove(PSTN-calls) */\n return screenShareButtonProps?.disabled ?? isDisabled(props.option);\n return isDisabled(props.option);\n };\n\n return (\n <ScreenShareButton\n data-ui-id=\"call-composite-screenshare-button\"\n {...screenShareButtonProps}\n showLabel={props.displayType !== 'compact'}\n disabled={\n screenShareButtonDisabled() || props.disabled || (isRoomsCall && adapter.getState().call?.role === 'Unknown')\n }\n styles={styles}\n />\n );\n};\n\nconst isDisabled = (option?: boolean | { disabled: boolean }): boolean => {\n if (option === undefined || option === true || option === false) {\n return false;\n }\n return option.disabled;\n};\n"]}
|
@@ -24,10 +24,10 @@ export const useHandlers = (
|
|
24
24
|
_component) => {
|
25
25
|
var _a, _b;
|
26
26
|
const adapter = useAdapter();
|
27
|
-
const
|
28
|
-
return createCompositeHandlers(adapter,
|
27
|
+
const capabilities = (_b = (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities;
|
28
|
+
return createCompositeHandlers(adapter, capabilities);
|
29
29
|
};
|
30
|
-
const createCompositeHandlers = memoizeOne((adapter,
|
30
|
+
const createCompositeHandlers = memoizeOne((adapter, capabilities) => {
|
31
31
|
return {
|
32
32
|
onCreateLocalStreamView: (options) => __awaiter(void 0, void 0, void 0, function* () {
|
33
33
|
return yield adapter.createStreamView(undefined, options);
|
@@ -133,16 +133,13 @@ const createCompositeHandlers = memoizeOne((adapter, canSpotlight) => {
|
|
133
133
|
askDevicePermission: (constrain) => __awaiter(void 0, void 0, void 0, function* () {
|
134
134
|
return adapter.askDevicePermission(constrain);
|
135
135
|
}),
|
136
|
-
/* @conditional-compile-remove(video-background-effects) */
|
137
136
|
onRemoveVideoBackgroundEffects: () => __awaiter(void 0, void 0, void 0, function* () {
|
138
137
|
return yield adapter.stopVideoBackgroundEffects();
|
139
138
|
}),
|
140
|
-
/* @conditional-compile-remove(video-background-effects) */
|
141
139
|
onBlurVideoBackground: (backgroundBlurConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
142
140
|
const blurConfig = Object.assign({ effectName: 'blur' }, backgroundBlurConfig);
|
143
141
|
return yield adapter.startVideoBackgroundEffect(blurConfig);
|
144
142
|
}),
|
145
|
-
/* @conditional-compile-remove(video-background-effects) */
|
146
143
|
onReplaceVideoBackground: (backgroundReplacementConfig) => __awaiter(void 0, void 0, void 0, function* () {
|
147
144
|
const replacementConfig = Object.assign({ effectName: 'replacement' }, backgroundReplacementConfig);
|
148
145
|
return yield adapter.startVideoBackgroundEffect(replacementConfig);
|
@@ -180,7 +177,7 @@ const createCompositeHandlers = memoizeOne((adapter, canSpotlight) => {
|
|
180
177
|
yield adapter.stopAllSpotlight();
|
181
178
|
}),
|
182
179
|
/* @conditional-compile-remove(spotlight) */
|
183
|
-
onStartLocalSpotlight:
|
180
|
+
onStartLocalSpotlight: (capabilities === null || capabilities === void 0 ? void 0 : capabilities.spotlightParticipant.isPresent)
|
184
181
|
? () => __awaiter(void 0, void 0, void 0, function* () {
|
185
182
|
yield adapter.startSpotlight();
|
186
183
|
})
|
@@ -190,13 +187,13 @@ const createCompositeHandlers = memoizeOne((adapter, canSpotlight) => {
|
|
190
187
|
yield adapter.stopSpotlight();
|
191
188
|
}),
|
192
189
|
/* @conditional-compile-remove(spotlight) */
|
193
|
-
onStartRemoteSpotlight:
|
190
|
+
onStartRemoteSpotlight: (capabilities === null || capabilities === void 0 ? void 0 : capabilities.spotlightParticipant.isPresent)
|
194
191
|
? (userIds) => __awaiter(void 0, void 0, void 0, function* () {
|
195
192
|
yield adapter.startSpotlight(userIds);
|
196
193
|
})
|
197
194
|
: undefined,
|
198
195
|
/* @conditional-compile-remove(spotlight) */
|
199
|
-
onStopRemoteSpotlight:
|
196
|
+
onStopRemoteSpotlight: (capabilities === null || capabilities === void 0 ? void 0 : capabilities.removeParticipantsSpotlight.isPresent)
|
200
197
|
? (userIds) => __awaiter(void 0, void 0, void 0, function* () {
|
201
198
|
yield adapter.stopSpotlight(userIds);
|
202
199
|
})
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useHandlers.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/hooks/useHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAKlC,OAAO,EAAoB,6BAA6B,EAAE,yCAAgC;AAE1F,OAAO,UAAU,MAAM,aAAa,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAA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E,CAAO,OAAkB,EAAiB,EAAE;YAC3D,MAAM,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,CAAA;QACD,4CAA4C;QAC5C,kBAAkB,EAAE,GAAwB,EAAE;YAC5C,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAC;QACnC,CAAC,CAAA;QACD,4CAA4C;QAC5C,qBAAqB,EAAE,YAAY;YACjC,CAAC,CAAC,GAAwB,EAAE;gBACxB,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC;YACjC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;QACb,4CAA4C;QAC5C,oBAAoB,EAAE,GAAwB,EAAE;YAC9C,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;QAChC,CAAC,CAAA;QACD,4CAA4C;QAC5C,sBAAsB,EAAE,YAAY;YAClC,CAAC,CAAC,CAAO,OAAkB,EAAiB,EAAE;gBAC1C,MAAM,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACxC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;QACb,4CAA4C;QAC5C,qBAAqB,EAAE,YAAY;YACjC,CAAC,CAAC,CAAO,OAAkB,EAAiB,EAAE;gBAC1C,MAAM,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACvC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommonCallingHandlers } from '@internal/calling-component-bindings';\n/* @conditional-compile-remove(spotlight) */\nimport { _ComponentCallingHandlers } from '@internal/calling-component-bindings';\nimport { CommonProperties, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { ReactElement } from 'react';\nimport memoizeOne from 'memoize-one';\nimport { CommonCallAdapter } from '..';\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoBackgroundBlurEffect, VideoBackgroundReplacementEffect } from '..';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isCameraOn } from '../utils';\nimport { DtmfTone } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction } from '@azure/communication-calling';\n/* @conditional-compile-remove(video-background-effects) */\nimport type { BackgroundReplacementConfig, BackgroundBlurConfig } from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport const useHandlers = <PropsT>(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _component: (props: PropsT) => ReactElement | null\n): Pick<CommonCallingHandlers, CommonProperties<CommonCallingHandlers, PropsT>> &\n /* @conditional-compile-remove(spotlight) */ Partial<_ComponentCallingHandlers> => {\n const adapter = useAdapter();\n const canSpotlight = !!adapter.getState().call?.capabilitiesFeature?.capabilities.spotlightParticipant.isPresent;\n return createCompositeHandlers(adapter, canSpotlight);\n};\n\nconst createCompositeHandlers = memoizeOne(\n (\n adapter: CommonCallAdapter,\n canSpotlight: boolean\n ): CommonCallingHandlers & /* @conditional-compile-remove(spotlight) */ Partial<_ComponentCallingHandlers> => {\n return {\n onCreateLocalStreamView: async (options) => {\n return await adapter.createStreamView(undefined, options);\n },\n onCreateRemoteStreamView: async (userId, options) => {\n return await adapter.createStreamView(userId, options);\n },\n onHangUp: async (forEveryone?: boolean) => {\n await adapter.leaveCall(forEveryone);\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onToggleHold: async () => {\n return adapter.getState().call?.state === 'LocalHold' ? await adapter.resumeCall() : await adapter.holdCall();\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (\n participant: Partial<CommunicationUserIdentifier & PhoneNumberIdentifier>,\n options?: AddPhoneNumberOptions\n ) => {\n if ('communicationUserId' in participant) {\n return await adapter.addParticipant(participant as CommunicationUserIdentifier);\n } else if ('phoneNumber' in participant) {\n return await adapter.addParticipant(participant as PhoneNumberIdentifier, options);\n }\n },\n onSendDtmfTone: async (dtmfTone: DtmfTone) => {\n await adapter.sendDtmfTone(dtmfTone);\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ) => {\n if (typeof userId === 'string') {\n await adapter.removeParticipant(userId);\n } else {\n /* @conditional-compile-remove(PSTN-calls) */\n await adapter.removeParticipant(_toCommunicationIdentifier(userId));\n }\n },\n onRaiseHand: async () => {\n await adapter.raiseHand();\n },\n onLowerHand: async () => {\n await adapter.lowerHand();\n },\n onToggleRaiseHand: async () => {\n adapter.getState().call?.raiseHand.localParticipantRaisedHand\n ? await adapter.lowerHand()\n : await adapter.raiseHand();\n },\n /* @conditional-compile-remove(reaction) */\n onReactionClick: async (reaction: Reaction) => {\n await adapter.onReactionClick(reaction);\n },\n onSelectCamera: async (deviceInfo, options) => {\n await adapter.setCamera(deviceInfo, options);\n },\n onSelectMicrophone: async (deviceInfo) => {\n await adapter.setMicrophone(deviceInfo);\n },\n onSelectSpeaker: async (deviceInfo) => {\n await adapter.setSpeaker(deviceInfo);\n },\n onStartCall: (participants, options?) => {\n const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));\n return adapter.startCall(rawIds, options);\n },\n onStartScreenShare: async () => {\n await adapter.startScreenShare();\n },\n onStopScreenShare: async () => {\n await adapter.stopScreenShare();\n },\n onToggleCamera: async (options) => {\n isCameraOn(adapter.getState()) ? await adapter.stopCamera() : await adapter.startCamera(options);\n },\n onToggleMicrophone: async () => {\n return adapter.getState().call?.isMuted ? await adapter.unmute() : await adapter.mute();\n },\n onToggleScreenShare: async () => {\n return adapter.getState().call?.isScreenSharingOn\n ? await adapter.stopScreenShare()\n : await adapter.startScreenShare();\n },\n onStartLocalVideo: async () => {\n if (adapter.getState().call) {\n return adapter.startCamera();\n }\n },\n onDisposeLocalStreamView: async () => {\n return adapter.disposeLocalVideoStreamView();\n },\n onDisposeRemoteStreamView: async (userId) => {\n return adapter.disposeStreamView(userId);\n },\n onDisposeRemoteScreenShareStreamView: async (userId) => {\n return adapter.disposeScreenShareStreamView(userId);\n },\n onDisposeRemoteVideoStreamView: async (userId) => {\n return adapter.disposeRemoteVideoStreamView(userId);\n },\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission: async (constrain) => {\n return adapter.askDevicePermission(constrain);\n },\n /* @conditional-compile-remove(video-background-effects) */\n onRemoveVideoBackgroundEffects: async () => {\n return await adapter.stopVideoBackgroundEffects();\n },\n /* @conditional-compile-remove(video-background-effects) */\n onBlurVideoBackground: async (backgroundBlurConfig?: BackgroundBlurConfig) => {\n const blurConfig: VideoBackgroundBlurEffect = {\n effectName: 'blur',\n ...backgroundBlurConfig\n };\n return await adapter.startVideoBackgroundEffect(blurConfig);\n },\n /* @conditional-compile-remove(video-background-effects) */\n onReplaceVideoBackground: async (backgroundReplacementConfig: BackgroundReplacementConfig) => {\n const replacementConfig: VideoBackgroundReplacementEffect = {\n effectName: 'replacement',\n ...backgroundReplacementConfig\n };\n return await adapter.startVideoBackgroundEffect(replacementConfig);\n },\n /* @conditional-compile-remove(close-captions) */\n onStartCaptions: async (options) => {\n await adapter.startCaptions(options);\n },\n /* @conditional-compile-remove(close-captions) */\n onStopCaptions: async () => {\n await adapter.stopCaptions();\n },\n /* @conditional-compile-remove(close-captions) */\n onSetSpokenLanguage: async (language) => {\n await adapter.setSpokenLanguage(language);\n },\n /* @conditional-compile-remove(close-captions) */\n onSetCaptionLanguage: async (language) => {\n await adapter.setCaptionLanguage(language);\n },\n /* @conditional-compile-remove(end-of-call-survey) */\n onSubmitSurvey: async (survey: CallSurvey): Promise<CallSurveyResponse | undefined> => {\n return await adapter.submitSurvey(survey);\n },\n /* @conditional-compile-remove(spotlight) */\n onStartSpotlight: async (userIds?: string[]): Promise<void> => {\n await adapter.startSpotlight(userIds);\n },\n /* @conditional-compile-remove(spotlight) */\n onStopSpotlight: async (userIds?: string[]): Promise<void> => {\n await adapter.stopSpotlight(userIds);\n },\n /* @conditional-compile-remove(spotlight) */\n onStopAllSpotlight: async (): Promise<void> => {\n await adapter.stopAllSpotlight();\n },\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight: canSpotlight\n ? async (): Promise<void> => {\n await adapter.startSpotlight();\n }\n : undefined,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight: async (): Promise<void> => {\n await adapter.stopSpotlight();\n },\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight: canSpotlight\n ? async (userIds?: string[]): Promise<void> => {\n await adapter.startSpotlight(userIds);\n }\n : undefined,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight: canSpotlight\n ? async (userIds?: string[]): Promise<void> => {\n await adapter.stopSpotlight(userIds);\n }\n : undefined\n };\n }\n);\n"]}
|
1
|
+
{"version":3,"file":"useHandlers.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/hooks/useHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAKlC,OAAO,EAAoB,6BAA6B,EAAE,yCAAgC;AAE1F,OAAO,UAAU,MAAM,aAAa,CAAC;AAIrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAoBtC,6CAA6C;AAC7C,OAAO,EAAE,0BAA0B,EAAE,yCAAgC;AAErE;;GAEG;AACH,+HAA+H;AAC/H,MAAM,CAAC,MAAM,WAAW,GAAG;AACzB,6DAA6D;AAC7D,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B,CAAC,SAAS;YACjE,CAAC,CAAC,GAAwB,EAAE;gBACxB,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC;YACjC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;QACb,4CAA4C;QAC5C,oBAAoB,EAAE,GAAwB,EAAE;YAC9C,MAAM,OAAO,CAAC,aAAa,EAAE,CAAC;QAChC,CAAC,CAAA;QACD,4CAA4C;QAC5C,sBAAsB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,oBAAoB,CAAC,SAAS;YAClE,CAAC,CAAC,CAAO,OAAkB,EAAiB,EAAE;gBAC1C,MAAM,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YACxC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;QACb,4CAA4C;QAC5C,qBAAqB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,2BAA2B,CAAC,SAAS;YACxE,CAAC,CAAC,CAAO,OAAkB,EAAiB,EAAE;gBAC1C,MAAM,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YACvC,CAAC,CAAA;YACH,CAAC,CAAC,SAAS;KACd,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommonCallingHandlers } from '@internal/calling-component-bindings';\n/* @conditional-compile-remove(spotlight) */\nimport { _ComponentCallingHandlers } from '@internal/calling-component-bindings';\nimport { CommonProperties, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { ReactElement } from 'react';\nimport memoizeOne from 'memoize-one';\nimport { CommonCallAdapter } from '..';\n\nimport { VideoBackgroundBlurEffect, VideoBackgroundReplacementEffect } from '..';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isCameraOn } from '../utils';\nimport { DtmfTone } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction } from '@azure/communication-calling';\n\nimport type {\n BackgroundReplacementConfig,\n BackgroundBlurConfig,\n ParticipantCapabilities\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { _toCommunicationIdentifier } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport const useHandlers = <PropsT>(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _component: (props: PropsT) => ReactElement | null\n): Pick<CommonCallingHandlers, CommonProperties<CommonCallingHandlers, PropsT>> &\n /* @conditional-compile-remove(spotlight) */ Partial<_ComponentCallingHandlers> => {\n const adapter = useAdapter();\n const capabilities = adapter.getState().call?.capabilitiesFeature?.capabilities;\n return createCompositeHandlers(adapter, capabilities);\n};\n\nconst createCompositeHandlers = memoizeOne(\n (\n adapter: CommonCallAdapter,\n capabilities?: ParticipantCapabilities\n ): CommonCallingHandlers & /* @conditional-compile-remove(spotlight) */ Partial<_ComponentCallingHandlers> => {\n return {\n onCreateLocalStreamView: async (options) => {\n return await adapter.createStreamView(undefined, options);\n },\n onCreateRemoteStreamView: async (userId, options) => {\n return await adapter.createStreamView(userId, options);\n },\n onHangUp: async (forEveryone?: boolean) => {\n await adapter.leaveCall(forEveryone);\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onToggleHold: async () => {\n return adapter.getState().call?.state === 'LocalHold' ? await adapter.resumeCall() : await adapter.holdCall();\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (\n participant: Partial<CommunicationUserIdentifier & PhoneNumberIdentifier>,\n options?: AddPhoneNumberOptions\n ) => {\n if ('communicationUserId' in participant) {\n return await adapter.addParticipant(participant as CommunicationUserIdentifier);\n } else if ('phoneNumber' in participant) {\n return await adapter.addParticipant(participant as PhoneNumberIdentifier, options);\n }\n },\n onSendDtmfTone: async (dtmfTone: DtmfTone) => {\n await adapter.sendDtmfTone(dtmfTone);\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ) => {\n if (typeof userId === 'string') {\n await adapter.removeParticipant(userId);\n } else {\n /* @conditional-compile-remove(PSTN-calls) */\n await adapter.removeParticipant(_toCommunicationIdentifier(userId));\n }\n },\n onRaiseHand: async () => {\n await adapter.raiseHand();\n },\n onLowerHand: async () => {\n await adapter.lowerHand();\n },\n onToggleRaiseHand: async () => {\n adapter.getState().call?.raiseHand.localParticipantRaisedHand\n ? await adapter.lowerHand()\n : await adapter.raiseHand();\n },\n /* @conditional-compile-remove(reaction) */\n onReactionClick: async (reaction: Reaction) => {\n await adapter.onReactionClick(reaction);\n },\n onSelectCamera: async (deviceInfo, options) => {\n await adapter.setCamera(deviceInfo, options);\n },\n onSelectMicrophone: async (deviceInfo) => {\n await adapter.setMicrophone(deviceInfo);\n },\n onSelectSpeaker: async (deviceInfo) => {\n await adapter.setSpeaker(deviceInfo);\n },\n onStartCall: (participants, options?) => {\n const rawIds = participants.map((participant) => toFlatCommunicationIdentifier(participant));\n return adapter.startCall(rawIds, options);\n },\n onStartScreenShare: async () => {\n await adapter.startScreenShare();\n },\n onStopScreenShare: async () => {\n await adapter.stopScreenShare();\n },\n onToggleCamera: async (options) => {\n isCameraOn(adapter.getState()) ? await adapter.stopCamera() : await adapter.startCamera(options);\n },\n onToggleMicrophone: async () => {\n return adapter.getState().call?.isMuted ? await adapter.unmute() : await adapter.mute();\n },\n onToggleScreenShare: async () => {\n return adapter.getState().call?.isScreenSharingOn\n ? await adapter.stopScreenShare()\n : await adapter.startScreenShare();\n },\n onStartLocalVideo: async () => {\n if (adapter.getState().call) {\n return adapter.startCamera();\n }\n },\n onDisposeLocalStreamView: async () => {\n return adapter.disposeLocalVideoStreamView();\n },\n onDisposeRemoteStreamView: async (userId) => {\n return adapter.disposeStreamView(userId);\n },\n onDisposeRemoteScreenShareStreamView: async (userId) => {\n return adapter.disposeScreenShareStreamView(userId);\n },\n onDisposeRemoteVideoStreamView: async (userId) => {\n return adapter.disposeRemoteVideoStreamView(userId);\n },\n /* @conditional-compile-remove(call-readiness) */\n askDevicePermission: async (constrain) => {\n return adapter.askDevicePermission(constrain);\n },\n\n onRemoveVideoBackgroundEffects: async () => {\n return await adapter.stopVideoBackgroundEffects();\n },\n\n onBlurVideoBackground: async (backgroundBlurConfig?: BackgroundBlurConfig) => {\n const blurConfig: VideoBackgroundBlurEffect = {\n effectName: 'blur',\n ...backgroundBlurConfig\n };\n return await adapter.startVideoBackgroundEffect(blurConfig);\n },\n\n onReplaceVideoBackground: async (backgroundReplacementConfig: BackgroundReplacementConfig) => {\n const replacementConfig: VideoBackgroundReplacementEffect = {\n effectName: 'replacement',\n ...backgroundReplacementConfig\n };\n return await adapter.startVideoBackgroundEffect(replacementConfig);\n },\n /* @conditional-compile-remove(close-captions) */\n onStartCaptions: async (options) => {\n await adapter.startCaptions(options);\n },\n /* @conditional-compile-remove(close-captions) */\n onStopCaptions: async () => {\n await adapter.stopCaptions();\n },\n /* @conditional-compile-remove(close-captions) */\n onSetSpokenLanguage: async (language) => {\n await adapter.setSpokenLanguage(language);\n },\n /* @conditional-compile-remove(close-captions) */\n onSetCaptionLanguage: async (language) => {\n await adapter.setCaptionLanguage(language);\n },\n /* @conditional-compile-remove(end-of-call-survey) */\n onSubmitSurvey: async (survey: CallSurvey): Promise<CallSurveyResponse | undefined> => {\n return await adapter.submitSurvey(survey);\n },\n /* @conditional-compile-remove(spotlight) */\n onStartSpotlight: async (userIds?: string[]): Promise<void> => {\n await adapter.startSpotlight(userIds);\n },\n /* @conditional-compile-remove(spotlight) */\n onStopSpotlight: async (userIds?: string[]): Promise<void> => {\n await adapter.stopSpotlight(userIds);\n },\n /* @conditional-compile-remove(spotlight) */\n onStopAllSpotlight: async (): Promise<void> => {\n await adapter.stopAllSpotlight();\n },\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight: capabilities?.spotlightParticipant.isPresent\n ? async (): Promise<void> => {\n await adapter.startSpotlight();\n }\n : undefined,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight: async (): Promise<void> => {\n await adapter.stopSpotlight();\n },\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight: capabilities?.spotlightParticipant.isPresent\n ? async (userIds?: string[]): Promise<void> => {\n await adapter.startSpotlight(userIds);\n }\n : undefined,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight: capabilities?.removeParticipantsSpotlight.isPresent\n ? async (userIds?: string[]): Promise<void> => {\n await adapter.stopSpotlight(userIds);\n }\n : undefined\n };\n }\n);\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOhD,cAAc,WAAW,CAAC;AAE1B,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,WAAW,CAAC;AAEnB,yDAAyD;AACzD,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { CallComposite } from './CallComposite';\nexport type { CallCompositeOptions, CallCompositeProps, RemoteVideoTileMenuOptions } from './CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DeviceCheckOptions } from './CallComposite';\nexport type { LocalVideoTileOptions } from './CallComposite';\nexport type { CallControlOptions } from './types/CallControlOptions';\n\nexport * from './Strings';\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';\n\nexport type { TeamsAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter, TeamsCallAdapterArgs, Profile, OnFetchProfileCallback } from './adapter';\n\nexport type {\n AzureCommunicationCallAdapterArgs,\n CallAdapterLocator,\n CommonCallAdapter,\n CallAdapterCallOperations,\n AzureCommunicationOutboundCallAdapterArgs\n} from './adapter';\n\
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOhD,cAAc,WAAW,CAAC;AAE1B,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,WAAW,CAAC;AAEnB,yDAAyD;AACzD,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { CallComposite } from './CallComposite';\nexport type { CallCompositeOptions, CallCompositeProps, RemoteVideoTileMenuOptions } from './CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DeviceCheckOptions } from './CallComposite';\nexport type { LocalVideoTileOptions } from './CallComposite';\nexport type { CallControlOptions } from './types/CallControlOptions';\n\nexport * from './Strings';\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';\n\nexport type { TeamsAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter, TeamsCallAdapterArgs, Profile, OnFetchProfileCallback } from './adapter';\n\nexport type {\n AzureCommunicationCallAdapterArgs,\n CallAdapterLocator,\n CommonCallAdapter,\n CallAdapterCallOperations,\n AzureCommunicationOutboundCallAdapterArgs\n} from './adapter';\n\nexport type { AzureCommunicationCallAdapterOptions } from './adapter';\n\nexport type { CommonCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './adapter';\n\nexport type {\n VideoBackgroundImage,\n VideoBackgroundEffect,\n VideoBackgroundNoEffect,\n VideoBackgroundBlurEffect,\n VideoBackgroundReplacementEffect\n} from './adapter/CallAdapter';\n\nexport type {\n CallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n JoinCallOptions,\n StartCallIdentifier\n} from './adapter';\n\n/* @conditional-compile-remove(close-captions) */\nexport type {\n CaptionsReceivedListener,\n IsCaptionsActiveChangedListener,\n IsCaptionLanguageChangedListener,\n IsSpokenLanguageChangedListener\n} from './adapter';\n\n/* @conditional-compile-remove(call-transfer) */\nexport type { TransferAcceptedListener } from './adapter';\n\n/* @conditional-compile-remove(capabilities) */\nexport type { CapabilitiesChangedListener } from './adapter';\n/* @conditional-compile-remove(capabilities) */\nexport type { CapabilityChangedNotificationStrings } from './components/CapabilitiesChangedNotificationBar';\n\n/* @conditional-compile-remove(spotlight) */\nexport type { SpotlightChangedListener } from './adapter';\n\nexport type { CallingSounds, SoundEffect } from './adapter';\n\n/* @conditional-compile-remove(spotlight) */\nexport type { SpotlightPromptStrings } from './components/Prompt';\n"]}
|
@@ -27,6 +27,8 @@ export interface CallPageProps {
|
|
27
27
|
userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';
|
28
28
|
onSetUserSetOverflowGalleryPosition?: (position: 'Responsive' | 'horizontalTop') => void;
|
29
29
|
onCloseChatPane?: () => void;
|
30
|
+
pinnedParticipants?: string[];
|
31
|
+
setPinnedParticipants?: (pinnedParticipants: string[]) => void;
|
30
32
|
}
|
31
33
|
/**
|
32
34
|
* @private
|
@@ -30,7 +30,7 @@ import { Prompt } from '../components/Prompt';
|
|
30
30
|
*/
|
31
31
|
export const CallPage = (props) => {
|
32
32
|
var _a;
|
33
|
-
const { callInvitationURL, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, mobileView, galleryLayout = 'floatingLocalVideo', onUserSetGalleryLayoutChange, userSetOverflowGalleryPosition = 'Responsive', onSetUserSetOverflowGalleryPosition, onCloseChatPane } = props;
|
33
|
+
const { callInvitationURL, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, mobileView, galleryLayout = 'floatingLocalVideo', onUserSetGalleryLayoutChange, userSetOverflowGalleryPosition = 'Responsive', onSetUserSetOverflowGalleryPosition, onCloseChatPane, pinnedParticipants, setPinnedParticipants } = props;
|
34
34
|
// To use useProps to get these states, we need to create another file wrapping Call,
|
35
35
|
// It seems unnecessary in this case, so we get the updated states using this approach.
|
36
36
|
const { callStatus } = useSelector(callStatusSelector);
|
@@ -60,7 +60,7 @@ export const CallPage = (props) => {
|
|
60
60
|
capabilitiesChangedNotificationBarProps: props.capabilitiesChangedNotificationBarProps, onSetDialpadPage: () => setDtmfDialerPresent(!dtmfDialerPresent), dtmfDialerPresent: dtmfDialerPresent }));
|
61
61
|
}
|
62
62
|
else {
|
63
|
-
return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId, localVideoTileOptions: options === null || options === void 0 ? void 0 : options.localVideoTile, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, userSetGalleryLayout: galleryLayout,
|
63
|
+
return (React.createElement(MediaGallery, Object.assign({ isMobile: mobileView }, mediaGalleryProps, mediaGalleryHandlers, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenuOptions, drawerMenuHostId: drawerMenuHostId, localVideoTileOptions: options === null || options === void 0 ? void 0 : options.localVideoTile, userSetOverflowGalleryPosition: userSetOverflowGalleryPosition, userSetGalleryLayout: galleryLayout, pinnedParticipants: pinnedParticipants, setPinnedParticipants: setPinnedParticipants,
|
64
64
|
/* @conditional-compile-remove(spotlight) */
|
65
65
|
setIsPromptOpen: setIsPromptOpen,
|
66
66
|
/* @conditional-compile-remove(spotlight) */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/CallPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,sDAA6C;AACjE,OAAO,EAAsB,QAAQ,EAAgC,4CAAmC;AAExG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CA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C5C,oBAAC,MAAM,kBAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,IAAM,WAAW,EAAI,CAE3F,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA8C,EAAW,EAAE;IAC1F,oFAAoF;IACpF,4EAA4E;IAC5E,uEAAuE;IACvE,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,iBAAiB,CAAC,IAAI,CAAC;AACtG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\nimport { useId } from '@fluentui/react-hooks';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ActiveErrorMessage, ErrorBar, ParticipantMenuItemsCallback } from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport React from 'react';\nimport { useState } from 'react';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { useLocale } from '../../localization';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { MediaGallery } from '../components/MediaGallery';\nimport { NetworkReconnectTile } from '../components/NetworkReconnectTile';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { complianceBannerSelector } from '../selectors/complianceBannerSelector';\nimport { mediaGallerySelector } from '../selectors/mediaGallerySelector';\nimport { getRemoteParticipantsConnectedSelector } from '../selectors/mediaGallerySelector';\nimport { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';\nimport { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';\nimport { reduceCallControlsForMobile } from '../utils';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n/* @conditional-compile-remove(capabilities) */\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { DtmfDialpadPage } from './DtmfDialpadPage';\nimport { showDtmfDialer } from '../utils/MediaGalleryUtils';\nimport { getTargetCallees } from '../selectors/baseSelectors';\n/* @conditional-compile-remove(spotlight) */\nimport { Prompt, PromptProps } from '../components/Prompt';\n\n/**\n * @private\n */\nexport interface CallPageProps {\n mobileView: boolean;\n modalLayerHostId: string;\n callInvitationURL?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n options?: CallCompositeOptions;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n galleryLayout: VideoGalleryLayout;\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n onUserSetGalleryLayoutChange?: (layout: VideoGalleryLayout) => void;\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n onSetUserSetOverflowGalleryPosition?: (position: 'Responsive' | 'horizontalTop') => void;\n onCloseChatPane?: () => void;\n}\n\n/**\n * @private\n */\nexport const CallPage = (props: CallPageProps): JSX.Element => {\n const {\n callInvitationURL,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n mobileView,\n galleryLayout = 'floatingLocalVideo',\n onUserSetGalleryLayoutChange,\n userSetOverflowGalleryPosition = 'Responsive',\n onSetUserSetOverflowGalleryPosition,\n onCloseChatPane\n } = props;\n\n // To use useProps to get these states, we need to create another file wrapping Call,\n // It seems unnecessary in this case, so we get the updated states using this approach.\n const { callStatus } = useSelector(callStatusSelector);\n const mediaGalleryProps = useSelector(mediaGallerySelector);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n const complianceBannerProps = useSelector(complianceBannerSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const mutedNotificationProps = useSelector(mutedNotificationSelector);\n const networkReconnectTileProps = useSelector(networkReconnectTileSelector);\n const remoteParticipantsConnected = useSelector(getRemoteParticipantsConnectedSelector);\n\n const callees = useSelector(getTargetCallees);\n const renderDtmfDialerFromStart = showDtmfDialer(callees, remoteParticipantsConnected);\n const [dtmfDialerPresent, setDtmfDialerPresent] = useState<boolean>(renderDtmfDialerFromStart);\n\n const strings = useLocale().strings.call;\n\n // Reduce the controls shown when mobile view is enabled.\n const callControlOptions = mobileView ? reduceCallControlsForMobile(options?.callControls) : options?.callControls;\n\n const drawerMenuHostId = useId('drawerMenuHost');\n /* @conditional-compile-remove(spotlight) */\n const [isPromptOpen, setIsPromptOpen] = useState<boolean>(false);\n /* @conditional-compile-remove(spotlight) */\n const [promptProps, setPromptProps] = useState<PromptProps>();\n\n const onRenderGalleryContentTrampoline = (): JSX.Element => {\n if (dtmfDialerPresent) {\n return (\n <DtmfDialpadPage\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n />\n );\n } else {\n return (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n remoteVideoTileMenuOptions={options?.remoteVideoTileMenuOptions}\n drawerMenuHostId={drawerMenuHostId}\n localVideoTileOptions={options?.localVideoTile}\n userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n userSetGalleryLayout={galleryLayout}\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen={setIsPromptOpen}\n /* @conditional-compile-remove(spotlight) */\n setPromptProps={setPromptProps}\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n />\n );\n }\n };\n\n return (\n <>\n <CallArrangement\n id={drawerMenuHostId}\n complianceBannerProps={{ ...complianceBannerProps, strings }}\n errorBarProps={options?.errorBar !== false && errorBarProps}\n mutedNotificationProps={mutedNotificationProps}\n callControlProps={{\n callInvitationURL: callInvitationURL,\n onFetchParticipantMenuItems: onFetchParticipantMenuItems,\n options: callControlOptions,\n increaseFlyoutItemSize: mobileView\n }}\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n mobileView={mobileView}\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() =>\n _isInCall(callStatus) ? (\n isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (\n onRenderGalleryContentTrampoline()\n ) : (\n <NetworkReconnectTile {...networkReconnectTileProps} />\n )\n ) : (\n <></>\n )\n }\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n onCloseChatPane={onCloseChatPane}\n dataUiId={'call-page'}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n onUserSetOverflowGalleryPositionChange={onSetUserSetOverflowGalleryPosition}\n onUserSetGalleryLayoutChange={onUserSetGalleryLayoutChange}\n userSetGalleryLayout={galleryLayout}\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen={setIsPromptOpen}\n /* @conditional-compile-remove(spotlight) */\n setPromptProps={setPromptProps}\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n />\n {\n /* @conditional-compile-remove(spotlight) */\n <Prompt isOpen={isPromptOpen} onDismiss={() => setIsPromptOpen(false)} {...promptProps} />\n }\n </>\n );\n};\n\n/**\n * @private\n */\nexport const isNetworkHealthy = (value: DiagnosticQuality | boolean | undefined): boolean => {\n // We know that the value is actually of type DiagnosticQuality for this diagnostic.\n // We ignore any boolen values, considering the network to still be healthy.\n // Thus, only DiagnosticQuality.Poor or .Bad indicate network problems.\n return value === true || value === false || value === undefined || value === DiagnosticQuality.Good;\n};\n"]}
|
1
|
+
{"version":3,"file":"CallPage.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/pages/CallPage.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,sDAA6C;AACjE,OAAO,EAAsB,QAAQ,EAAgC,4CAAmC;AAExG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,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C,KAA8C,EAAW,EAAE;IAC1F,oFAAoF;IACpF,4EAA4E;IAC5E,uEAAuE;IACvE,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,iBAAiB,CAAC,IAAI,CAAC;AACtG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\nimport { useId } from '@fluentui/react-hooks';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { ActiveErrorMessage, ErrorBar, ParticipantMenuItemsCallback } from '@internal/react-components';\nimport { VideoGalleryLayout } from '@internal/react-components';\nimport React from 'react';\nimport { useState } from 'react';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { useLocale } from '../../localization';\nimport { CallCompositeOptions } from '../CallComposite';\nimport { CallArrangement } from '../components/CallArrangement';\nimport { MediaGallery } from '../components/MediaGallery';\nimport { NetworkReconnectTile } from '../components/NetworkReconnectTile';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { complianceBannerSelector } from '../selectors/complianceBannerSelector';\nimport { mediaGallerySelector } from '../selectors/mediaGallerySelector';\nimport { getRemoteParticipantsConnectedSelector } from '../selectors/mediaGallerySelector';\nimport { mutedNotificationSelector } from '../selectors/mutedNotificationSelector';\nimport { networkReconnectTileSelector } from '../selectors/networkReconnectTileSelector';\nimport { reduceCallControlsForMobile } from '../utils';\nimport { MobileChatSidePaneTabHeaderProps } from '../../common/TabHeader';\nimport { SidePaneRenderer } from '../components/SidePane/SidePaneProvider';\n/* @conditional-compile-remove(capabilities) */\nimport { CapabilitiesChangeNotificationBarProps } from '../components/CapabilitiesChangedNotificationBar';\nimport { DtmfDialpadPage } from './DtmfDialpadPage';\nimport { showDtmfDialer } from '../utils/MediaGalleryUtils';\nimport { getTargetCallees } from '../selectors/baseSelectors';\n/* @conditional-compile-remove(spotlight) */\nimport { Prompt, PromptProps } from '../components/Prompt';\n\n/**\n * @private\n */\nexport interface CallPageProps {\n mobileView: boolean;\n modalLayerHostId: string;\n callInvitationURL?: string;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n updateSidePaneRenderer: (renderer: SidePaneRenderer | undefined) => void;\n mobileChatTabHeader?: MobileChatSidePaneTabHeaderProps;\n options?: CallCompositeOptions;\n latestErrors: ActiveErrorMessage[];\n onDismissError: (error: ActiveErrorMessage) => void;\n galleryLayout: VideoGalleryLayout;\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps?: CapabilitiesChangeNotificationBarProps;\n onUserSetGalleryLayoutChange?: (layout: VideoGalleryLayout) => void;\n userSetOverflowGalleryPosition?: 'Responsive' | 'horizontalTop';\n onSetUserSetOverflowGalleryPosition?: (position: 'Responsive' | 'horizontalTop') => void;\n onCloseChatPane?: () => void;\n pinnedParticipants?: string[];\n setPinnedParticipants?: (pinnedParticipants: string[]) => void;\n}\n\n/**\n * @private\n */\nexport const CallPage = (props: CallPageProps): JSX.Element => {\n const {\n callInvitationURL,\n onFetchAvatarPersonaData,\n onFetchParticipantMenuItems,\n options,\n mobileView,\n galleryLayout = 'floatingLocalVideo',\n onUserSetGalleryLayoutChange,\n userSetOverflowGalleryPosition = 'Responsive',\n onSetUserSetOverflowGalleryPosition,\n onCloseChatPane,\n pinnedParticipants,\n setPinnedParticipants\n } = props;\n\n // To use useProps to get these states, we need to create another file wrapping Call,\n // It seems unnecessary in this case, so we get the updated states using this approach.\n const { callStatus } = useSelector(callStatusSelector);\n const mediaGalleryProps = useSelector(mediaGallerySelector);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n const complianceBannerProps = useSelector(complianceBannerSelector);\n const errorBarProps = usePropsFor(ErrorBar);\n const mutedNotificationProps = useSelector(mutedNotificationSelector);\n const networkReconnectTileProps = useSelector(networkReconnectTileSelector);\n const remoteParticipantsConnected = useSelector(getRemoteParticipantsConnectedSelector);\n\n const callees = useSelector(getTargetCallees);\n const renderDtmfDialerFromStart = showDtmfDialer(callees, remoteParticipantsConnected);\n const [dtmfDialerPresent, setDtmfDialerPresent] = useState<boolean>(renderDtmfDialerFromStart);\n\n const strings = useLocale().strings.call;\n\n // Reduce the controls shown when mobile view is enabled.\n const callControlOptions = mobileView ? reduceCallControlsForMobile(options?.callControls) : options?.callControls;\n\n const drawerMenuHostId = useId('drawerMenuHost');\n /* @conditional-compile-remove(spotlight) */\n const [isPromptOpen, setIsPromptOpen] = useState<boolean>(false);\n /* @conditional-compile-remove(spotlight) */\n const [promptProps, setPromptProps] = useState<PromptProps>();\n\n const onRenderGalleryContentTrampoline = (): JSX.Element => {\n if (dtmfDialerPresent) {\n return (\n <DtmfDialpadPage\n mobileView={props.mobileView}\n modalLayerHostId={props.modalLayerHostId}\n options={props.options}\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n />\n );\n } else {\n return (\n <MediaGallery\n isMobile={mobileView}\n {...mediaGalleryProps}\n {...mediaGalleryHandlers}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n remoteVideoTileMenuOptions={options?.remoteVideoTileMenuOptions}\n drawerMenuHostId={drawerMenuHostId}\n localVideoTileOptions={options?.localVideoTile}\n userSetOverflowGalleryPosition={userSetOverflowGalleryPosition}\n userSetGalleryLayout={galleryLayout}\n pinnedParticipants={pinnedParticipants}\n setPinnedParticipants={setPinnedParticipants}\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen={setIsPromptOpen}\n /* @conditional-compile-remove(spotlight) */\n setPromptProps={setPromptProps}\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n />\n );\n }\n };\n\n return (\n <>\n <CallArrangement\n id={drawerMenuHostId}\n complianceBannerProps={{ ...complianceBannerProps, strings }}\n errorBarProps={options?.errorBar !== false && errorBarProps}\n mutedNotificationProps={mutedNotificationProps}\n callControlProps={{\n callInvitationURL: callInvitationURL,\n onFetchParticipantMenuItems: onFetchParticipantMenuItems,\n options: callControlOptions,\n increaseFlyoutItemSize: mobileView\n }}\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n mobileView={mobileView}\n modalLayerHostId={props.modalLayerHostId}\n onRenderGalleryContent={() =>\n _isInCall(callStatus) ? (\n isNetworkHealthy(networkReconnectTileProps.networkReconnectValue) ? (\n onRenderGalleryContentTrampoline()\n ) : (\n <NetworkReconnectTile {...networkReconnectTileProps} />\n )\n ) : (\n <></>\n )\n }\n updateSidePaneRenderer={props.updateSidePaneRenderer}\n mobileChatTabHeader={props.mobileChatTabHeader}\n onCloseChatPane={onCloseChatPane}\n dataUiId={'call-page'}\n latestErrors={props.latestErrors}\n onDismissError={props.onDismissError}\n onUserSetOverflowGalleryPositionChange={onSetUserSetOverflowGalleryPosition}\n onUserSetGalleryLayoutChange={onUserSetGalleryLayoutChange}\n userSetGalleryLayout={galleryLayout}\n /* @conditional-compile-remove(capabilities) */\n capabilitiesChangedNotificationBarProps={props.capabilitiesChangedNotificationBarProps}\n onSetDialpadPage={() => setDtmfDialerPresent(!dtmfDialerPresent)}\n dtmfDialerPresent={dtmfDialerPresent}\n /* @conditional-compile-remove(spotlight) */\n setIsPromptOpen={setIsPromptOpen}\n /* @conditional-compile-remove(spotlight) */\n setPromptProps={setPromptProps}\n /* @conditional-compile-remove(spotlight) */\n hideSpotlightButtons={options?.spotlight?.hideSpotlightButtons}\n />\n {\n /* @conditional-compile-remove(spotlight) */\n <Prompt isOpen={isPromptOpen} onDismiss={() => setIsPromptOpen(false)} {...promptProps} />\n }\n </>\n );\n};\n\n/**\n * @private\n */\nexport const isNetworkHealthy = (value: DiagnosticQuality | boolean | undefined): boolean => {\n // We know that the value is actually of type DiagnosticQuality for this diagnostic.\n // We ignore any boolen values, considering the network to still be healthy.\n // Thus, only DiagnosticQuality.Poor or .Bad indicate network problems.\n return value === true || value === false || value === undefined || value === DiagnosticQuality.Good;\n};\n"]}
|