@azure/communication-react 1.5.1-beta.1 → 1.5.1-beta.3
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/CHANGELOG.beta.md +123 -1
- package/CHANGELOG.json +1068 -0
- package/README.md +1 -1
- package/dist/communication-react.d.ts +602 -170
- package/dist/dist-cjs/communication-react/index.js +6134 -3678
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +13 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +36 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +49 -0
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +53 -0
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -0
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +12 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +27 -1
- 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 +3 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +3 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js +2 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +68 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +19 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +95 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +57 -0
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +19 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +18 -0
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +38 -0
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +6 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +18 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.d.ts +4 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +5 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +3 -0
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +5 -0
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Logger.d.ts +16 -29
- package/dist/dist-esm/calling-stateful-client/src/Logger.js +16 -29
- package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +137 -370
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.d.ts +17 -0
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js +198 -0
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +7 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +10 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index.js +2 -0
- package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +59 -5
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.d.ts +4 -0
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.js +4 -0
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +32 -26
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +15 -3
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +6 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +9 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +12 -0
- package/dist/dist-esm/react-components/src/components/CameraButton.js +24 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Caption.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/Caption.js +33 -0
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +31 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +49 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +37 -0
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +88 -0
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +22 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +19 -16
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.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 +4 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +11 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +38 -20
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +14 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +96 -11
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.js +79 -55
- package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +1 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +13 -0
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +5 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/GridLayout.js +1 -1
- package/dist/dist-esm/react-components/src/components/GridLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +29 -24
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +38 -6
- package/dist/dist-esm/react-components/src/components/MessageThread.js +110 -51
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +12 -0
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +29 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +1 -1
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.d.ts +4 -2
- package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js +6 -42
- package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.d.ts +35 -0
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js +32 -0
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js +10 -2
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.js +5 -2
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +70 -0
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +52 -0
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VerticalGallery.d.ts +67 -0
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js +113 -0
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.js +65 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +75 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +44 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +88 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +80 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +55 -19
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +10 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +12 -10
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +81 -24
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +11 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +63 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +8 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +32 -7
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +28 -12
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +2 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +4 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +8 -7
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.d.ts +64 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js +79 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.d.ts +25 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.js +94 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +4 -4
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +58 -49
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +25 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +32 -4
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +9 -12
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +12 -1
- package/dist/dist-esm/react-components/src/components/index.js +11 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +33 -0
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +60 -0
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.d.ts +34 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +86 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +14 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js +16 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js +1 -0
- package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +7 -2
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +58 -2
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.d.ts +32 -0
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js +66 -0
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +1 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +6 -4
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.d.ts +11 -0
- package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.js +22 -0
- package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils/responsive.d.ts +6 -0
- package/dist/dist-esm/react-components/src/components/utils/responsive.js +7 -0
- package/dist/dist-esm/react-components/src/components/utils/responsive.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.d.ts +9 -0
- package/dist/dist-esm/react-components/src/components/utils.js +24 -0
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js +6 -14
- package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js.map +1 -1
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +10 -4
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +7 -2
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +2 -0
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +5 -0
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +18 -4
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +17 -4
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +1 -1
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +11 -0
- package/dist/dist-esm/react-components/src/theming/icons.js +33 -7
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +48 -0
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js +4 -0
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +21 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.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 +2 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +65 -0
- 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 +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +69 -7
- 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.d.ts +53 -0
- 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/index.d.ts +1 -0
- 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 +103 -21
- 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 -2
- 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/LocalPreview.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +21 -3
- 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/NetworkReconnectTile.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.d.ts +1 -1
- 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/Custom.d.ts +9 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +4 -32
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.d.ts +1 -1
- 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/EndCall.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +1 -1
- 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/Participants.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.d.ts +1 -1
- 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 +16 -0
- 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.d.ts +3 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -1
- 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/baseSelectors.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +41 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +5 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +20 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.d.ts +20 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js +21 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +5 -87
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +15 -75
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +12 -6
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +17 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +66 -6
- 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 +30 -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.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +24 -0
- 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 +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +5 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +27 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +19 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +68 -6
- 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/ChatAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +60 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +107 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js +38 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +30 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +286 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +83 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +81 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/ControlBar}/DesktopMoreButton.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +193 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/PeopleButton.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/PeopleButton.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/Drawer}/MoreDrawer.d.ts +15 -2
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/Drawer}/MoreDrawer.js +113 -9
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js +24 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/Drawer}/PreparedMoreDrawer.d.ts +3 -2
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js +26 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.d.ts +20 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js +55 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js +25 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/common/constants.js +11 -0
- package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +13 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +8 -14
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.js +9 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +165 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +66 -1
- package/package.json +15 -16
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +0 -19
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +0 -27
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +0 -190
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.d.ts +0 -67
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +0 -75
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js +0 -22
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +0 -65
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +0 -1
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js
CHANGED
@@ -1,27 +1,42 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT license.
|
3
3
|
import { mergeStyles, Stack } from '@fluentui/react';
|
4
|
+
import { _isInLobbyOrConnecting } from "../../../../../calling-component-bindings/src";
|
4
5
|
import { _ComplianceBanner, _useContainerHeight, _useContainerWidth, ErrorBar, useTheme } from "../../../../../react-components/src";
|
5
6
|
/* @conditional-compile-remove(rooms) */
|
6
7
|
import { _usePermissions } from "../../../../../react-components/src";
|
7
|
-
import React, { useMemo, useRef } from 'react';
|
8
|
-
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
8
|
+
import React, { useMemo, useRef, useState } from 'react';
|
9
9
|
import { useCallback } from 'react';
|
10
|
+
/* @conditional-compile-remove(close-captions) */
|
11
|
+
import { CaptionsBanner } from '../../common/CaptionsBanner';
|
10
12
|
import { containerDivStyles } from '../../common/ContainerRectProps';
|
11
13
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
14
|
+
import { compositeMinWidthRem } from '../../common/styles/Composite.styles';
|
12
15
|
import { useAdapter } from '../adapter/CallAdapterProvider';
|
13
16
|
import { CallControls } from '../components/CallControls';
|
14
|
-
|
17
|
+
import { CommonCallControlBar } from '../../common/ControlBar/CommonCallControlBar';
|
15
18
|
import { useSidePaneState } from '../hooks/useSidePaneState';
|
16
19
|
import { callArrangementContainerStyles, callControlsContainerStyles, notificationsContainerStyles, containerStyleDesktop, containerStyleMobile, mediaGalleryContainerStyles, galleryParentContainerStyles, bannerNotificationStyles } from '../styles/CallPage.styles';
|
17
20
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
18
21
|
import { CallPane } from './CallPane';
|
19
22
|
import { MutedNotification } from './MutedNotification';
|
23
|
+
import { useSelector } from '../hooks/useSelector';
|
24
|
+
import { callStatusSelector } from '../selectors/callStatusSelector';
|
25
|
+
import { PreparedMoreDrawer } from '../../common/Drawer/PreparedMoreDrawer';
|
26
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
27
|
+
import { SendDtmfDialpad } from '../../common/SendDtmfDialpad';
|
28
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
29
|
+
import { useCallWithChatCompositeStrings } from '../../CallWithChatComposite/hooks/useCallWithChatCompositeStrings';
|
30
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
31
|
+
import { getPage } from '../selectors/baseSelectors';
|
32
|
+
/* @conditional-compile-remove(close-captions) */
|
33
|
+
import { getCallStatus, getIsTeamsCall } from '../selectors/baseSelectors';
|
34
|
+
import { drawerContainerStyles } from '../styles/CallComposite.styles';
|
20
35
|
/**
|
21
36
|
* @private
|
22
37
|
*/
|
23
38
|
export const CallArrangement = (props) => {
|
24
|
-
var _a, _b;
|
39
|
+
var _a, _b, _c, _d, _e;
|
25
40
|
const containerClassName = useMemo(() => {
|
26
41
|
return props.mobileView ? containerStyleMobile : containerStyleDesktop;
|
27
42
|
}, [props.mobileView]);
|
@@ -30,16 +45,57 @@ export const CallArrangement = (props) => {
|
|
30
45
|
const containerRef = useRef(null);
|
31
46
|
const containerWidth = _useContainerWidth(containerRef);
|
32
47
|
const containerHeight = _useContainerHeight(containerRef);
|
33
|
-
|
48
|
+
const isInLobby = _isInLobbyOrConnecting(useSelector(callStatusSelector).callStatus);
|
49
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
50
|
+
const isInLocalHold = useSelector(getPage) === 'hold';
|
34
51
|
const adapter = useAdapter();
|
52
|
+
const { activePane, closePane,
|
35
53
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
36
|
-
|
54
|
+
openPeoplePane, togglePeoplePane } = useSidePaneState();
|
37
55
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
38
56
|
const isMobileWithActivePane = props.mobileView && activePane;
|
39
57
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
40
58
|
const callCompositeContainerCSS = useMemo(() => {
|
41
|
-
return {
|
42
|
-
|
59
|
+
return {
|
60
|
+
display: isMobileWithActivePane ? 'none' : 'flex',
|
61
|
+
minWidth: props.mobileView ? 'unset' : `${compositeMinWidthRem}rem`,
|
62
|
+
width: '100%',
|
63
|
+
height: '100%'
|
64
|
+
};
|
65
|
+
}, [isMobileWithActivePane, props.mobileView]);
|
66
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
67
|
+
const callWithChatStrings = useCallWithChatCompositeStrings();
|
68
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
69
|
+
const dialpadStrings = useMemo(() => ({
|
70
|
+
dialpadModalAriaLabel: callWithChatStrings.dialpadModalAriaLabel,
|
71
|
+
dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,
|
72
|
+
placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText
|
73
|
+
}), [callWithChatStrings]);
|
74
|
+
const [showDrawer, setShowDrawer] = useState(false);
|
75
|
+
const onMoreButtonClicked = useCallback(() => {
|
76
|
+
closePane();
|
77
|
+
setShowDrawer(true);
|
78
|
+
}, [closePane]);
|
79
|
+
const closeDrawer = useCallback(() => {
|
80
|
+
setShowDrawer(false);
|
81
|
+
}, []);
|
82
|
+
const onMoreDrawerPeopleClicked = useCallback(() => {
|
83
|
+
setShowDrawer(false);
|
84
|
+
togglePeoplePane();
|
85
|
+
}, [togglePeoplePane]);
|
86
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
87
|
+
const alternateCallerId = useAdapter().getState().alternateCallerId;
|
88
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
89
|
+
const [showDtmfDialpad, setShowDtmfDialpad] = useState(false);
|
90
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
91
|
+
const onDismissDtmfDialpad = () => {
|
92
|
+
setShowDtmfDialpad(false);
|
93
|
+
};
|
94
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
95
|
+
const onClickShowDialpad = () => {
|
96
|
+
setShowDtmfDialpad(true);
|
97
|
+
};
|
98
|
+
const drawerContainerStylesValue = useMemo(() => drawerContainerStyles(10), []);
|
43
99
|
// To be removed once feature is out of beta, replace with callCompositeContainerCSS
|
44
100
|
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
45
101
|
const callCompositeContainerFlex = () => {
|
@@ -77,26 +133,47 @@ export const CallArrangement = (props) => {
|
|
77
133
|
if (!rolePermissions.cameraButton && props.errorBarProps) {
|
78
134
|
errorBarProps = Object.assign(Object.assign({}, props.errorBarProps), { activeErrorMessages: props.errorBarProps.activeErrorMessages.filter((e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari') });
|
79
135
|
}
|
136
|
+
/* @conditional-compile-remove(close-captions) */
|
137
|
+
const isTeamsCall = useSelector(getIsTeamsCall);
|
138
|
+
/* @conditional-compile-remove(close-captions) */
|
139
|
+
const hasJoinedCall = useSelector(getCallStatus) === 'Connected';
|
80
140
|
return (React.createElement("div", { ref: containerRef, className: mergeStyles(containerDivStyles), id: props.id },
|
81
141
|
React.createElement(Stack, { verticalFill: true, horizontalAlign: "stretch", className: containerClassName, "data-ui-id": props.dataUiId },
|
82
142
|
React.createElement(Stack, { grow: true, styles: callArrangementContainerStyles },
|
83
|
-
React.createElement(Stack.Item, { styles: notificationsContainerStyles },
|
84
|
-
React.createElement(Stack, { styles: bannerNotificationStyles },
|
85
|
-
React.createElement(_ComplianceBanner, Object.assign({}, props.complianceBannerProps))),
|
86
|
-
errorBarProps !== false && (React.createElement(Stack, { styles: bannerNotificationStyles },
|
87
|
-
React.createElement(ErrorBar, Object.assign({}, errorBarProps)))),
|
88
|
-
canUnmute && !!props.mutedNotificationProps && React.createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps))),
|
89
143
|
((_b = props.callControlProps) === null || _b === void 0 ? void 0 : _b.options) !== false &&
|
90
144
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
91
|
-
!isMobileWithActivePane && (React.createElement(Stack.Item, { className: callControlsContainerStyles },
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
145
|
+
!isMobileWithActivePane && (React.createElement(Stack.Item, { className: callControlsContainerStyles }, isLegacyCallControlEnabled((_c = props.callControlProps) === null || _c === void 0 ? void 0 : _c.options) ? (React.createElement(CallControls, Object.assign({}, props.callControlProps, { containerWidth: containerWidth, containerHeight: containerHeight, isMobile: props.mobileView,
|
146
|
+
/* @conditional-compile-remove(one-to-n-calling) */
|
147
|
+
peopleButtonChecked: activePane === 'people',
|
148
|
+
/* @conditional-compile-remove(one-to-n-calling) */
|
149
|
+
onPeopleButtonClicked: togglePeoplePane }))) : (React.createElement(CommonCallControlBar, Object.assign({}, props.callControlProps, { callControls: props.callControlProps.options, callAdapter: adapter, mobileView: props.mobileView, disableButtonsForLobbyPage: isInLobby, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeoplePane, onMoreButtonClicked: onMoreButtonClicked,
|
150
|
+
/* @conditional-compile-remove(close-captions) */
|
151
|
+
isCaptionsSupported: isTeamsCall && hasJoinedCall }))))),
|
152
|
+
((_d = props.callControlProps) === null || _d === void 0 ? void 0 : _d.options) !== false && showDrawer && (React.createElement(Stack, { styles: drawerContainerStylesValue },
|
153
|
+
React.createElement(PreparedMoreDrawer, { callControls: props.callControlProps.options, onLightDismiss: closeDrawer, onPeopleButtonClicked: onMoreDrawerPeopleClicked,
|
154
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
155
|
+
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
|
156
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
157
|
+
disableButtonsForHoldScreen: isInLocalHold,
|
158
|
+
/* @conditional-compile-remove(close-captions) */
|
159
|
+
isCaptionsSupported: isTeamsCall && hasJoinedCall }))),
|
160
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
161
|
+
((_e = props.callControlProps) === null || _e === void 0 ? void 0 : _e.options) !== false && showDtmfDialpad && (React.createElement(Stack, { styles: drawerContainerStylesValue },
|
162
|
+
React.createElement(SendDtmfDialpad, { isMobile: props.mobileView, strings: dialpadStrings, showDialpad: showDtmfDialpad, onDismissDialpad: onDismissDtmfDialpad }))),
|
97
163
|
React.createElement(Stack, { horizontal: true, grow: true },
|
98
164
|
React.createElement(Stack.Item, { grow: true, style: callCompositeContainerFlex() },
|
99
|
-
React.createElement(Stack.Item, { styles: callGalleryStyles, grow: true },
|
165
|
+
React.createElement(Stack.Item, { styles: callGalleryStyles, grow: true },
|
166
|
+
React.createElement(Stack, { verticalFill: true, styles: mediaGalleryContainerStyles },
|
167
|
+
React.createElement(Stack.Item, { styles: notificationsContainerStyles },
|
168
|
+
React.createElement(Stack, { styles: bannerNotificationStyles },
|
169
|
+
React.createElement(_ComplianceBanner, Object.assign({}, props.complianceBannerProps))),
|
170
|
+
errorBarProps !== false && (React.createElement(Stack, { styles: bannerNotificationStyles },
|
171
|
+
React.createElement(ErrorBar, Object.assign({}, errorBarProps)))),
|
172
|
+
canUnmute && !!props.mutedNotificationProps && (React.createElement(MutedNotification, Object.assign({}, props.mutedNotificationProps)))),
|
173
|
+
props.onRenderGalleryContent && props.onRenderGalleryContent(),
|
174
|
+
/* @conditional-compile-remove(close-captions) */
|
175
|
+
true &&
|
176
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !isInLocalHold && (React.createElement(CaptionsBanner, { isMobile: props.mobileView }))))),
|
100
177
|
/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */
|
101
178
|
callPaneContent())))));
|
102
179
|
};
|
@@ -110,4 +187,9 @@ const showShowPeopleTabHeaderButton = (callControls) => {
|
|
110
187
|
}
|
111
188
|
return callControls.participantsButton !== false;
|
112
189
|
};
|
190
|
+
const isLegacyCallControlEnabled = (options) => {
|
191
|
+
/* @conditional-compile-remove(new-call-control-bar) */
|
192
|
+
return !!options && options !== true && !!(options === null || options === void 0 ? void 0 : options.legacyControlBarExperience);
|
193
|
+
return true;
|
194
|
+
};
|
113
195
|
//# sourceMappingURL=CallArrangement.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallArrangement.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EAER,QAAQ,EACT,4CAAmC;AACpC,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/C,2FAA2F;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,2FAA2F;AAC3F,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAqB,MAAM,4BAA4B,CAAC;AAC7E,2FAA2F;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,4BAA4B,EAC5B,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AAGnC,2FAA2F;AAC3F,OAAO,EAAE,QAA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poration.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callArrangementContainerStyles,\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallControlOptions } from '../types/CallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n id?: string;\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex', width: '100%', height: '100%' };\n }, [isMobileWithActivePane]);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return callCompositeContainerCSS;\n return { display: 'flex', width: '100%', height: '100%' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n let errorBarProps = props.errorBarProps;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton && props.errorBarProps) {\n errorBarProps = {\n ...props.errorBarProps,\n activeErrorMessages: props.errorBarProps.activeErrorMessages.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n )\n };\n }\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)} id={props.id}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack grow styles={callArrangementContainerStyles}>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && <MutedNotification {...props.mutedNotificationProps} />}\n </Stack.Item>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n </Stack.Item>\n )}\n <Stack horizontal grow>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n {props.onRenderGalleryContent && (\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n {props.onRenderGalleryContent()}\n </Stack>\n )}\n </Stack.Item>\n </Stack.Item>\n {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n callPaneContent()\n }\n </Stack>\n </Stack>\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
|
1
|
+
{"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallArrangement.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAa,sBAAsB,EAAE,sDAA6C;AACzF,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EAER,QAAQ,EACT,4CAAmC;AACpC,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO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,CAAC,KAAK,CAAC,sBAAsB,IAAI,CAC9C,oBAAC,iBAAiB,oBAAK,KAAK,CAAC,sBAAsB,EAAI,CACxD,CACU;gCACZ,KAAK,CAAC,sBAAsB,IAAI,KAAK,CAAC,sBAAsB,EAAE;gCAE7D,iDAAiD;gCACjD,IAAI;oCACF,6CAA6C,CAAC,mDAAmD,CAAC,CAAC,aAAa,IAAI,CAClH,oBAAC,cAAc,IAAC,QAAQ,EAAE,KAAK,CAAC,UAAU,GAAI,CAC/C,CAEC,CACG,CACF;oBAEX,2FAA2F;oBAC3F,eAAe,EAAE,CAEb,CACF,CACF,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,2FAA2F;AAC3F,MAAM,6BAA6B,GAAG,CAAC,YAAiD,EAAW,EAAE;IACnG,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,kBAAkB,KAAK,KAAK,CAAC;AACnD,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,CAAC,OAAsC,EAAW,EAAE;IACrF,uDAAuD;IACvD,OAAO,CAAC,CAAC,OAAO,IAAI,OAAO,KAAK,IAAI,IAAI,CAAC,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,0BAA0B,CAAA,CAAC;IAC9E,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall, _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsBanner } from '../../common/CaptionsBanner';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { compositeMinWidthRem } from '../../common/styles/Composite.styles';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\nimport { CommonCallControlBar } from '../../common/ControlBar/CommonCallControlBar';\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callArrangementContainerStyles,\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CommonCallControlOptions } from '../../common/types/CommonCallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\nimport { CallAdapter } from '../adapter';\nimport { useSelector } from '../hooks/useSelector';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { PreparedMoreDrawer } from '../../common/Drawer/PreparedMoreDrawer';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useCallWithChatCompositeStrings } from '../../CallWithChatComposite/hooks/useCallWithChatCompositeStrings';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { getPage } from '../selectors/baseSelectors';\n/* @conditional-compile-remove(close-captions) */\nimport { getCallStatus, getIsTeamsCall } from '../selectors/baseSelectors';\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n id?: string;\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n const isInLobby = _isInLobbyOrConnecting(useSelector(callStatusSelector).callStatus);\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const isInLocalHold = useSelector(getPage) === 'hold';\n\n const adapter = useAdapter();\n\n const {\n activePane,\n closePane,\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n openPeoplePane,\n togglePeoplePane\n } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callCompositeContainerCSS = useMemo(() => {\n return {\n display: isMobileWithActivePane ? 'none' : 'flex',\n minWidth: props.mobileView ? 'unset' : `${compositeMinWidthRem}rem`,\n width: '100%',\n height: '100%'\n };\n }, [isMobileWithActivePane, props.mobileView]);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const callWithChatStrings = useCallWithChatCompositeStrings();\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: callWithChatStrings.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: callWithChatStrings.dialpadCloseModalButtonAriaLabel,\n placeholderText: callWithChatStrings.dtmfDialpadPlaceholderText\n }),\n [callWithChatStrings]\n );\n\n const [showDrawer, setShowDrawer] = useState(false);\n const onMoreButtonClicked = useCallback(() => {\n closePane();\n setShowDrawer(true);\n }, [closePane]);\n const closeDrawer = useCallback(() => {\n setShowDrawer(false);\n }, []);\n const onMoreDrawerPeopleClicked = useCallback(() => {\n setShowDrawer(false);\n togglePeoplePane();\n }, [togglePeoplePane]);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDtmfDialpad, setShowDtmfDialpad] = useState(false);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDtmfDialpad = (): void => {\n setShowDtmfDialpad(false);\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onClickShowDialpad = (): void => {\n setShowDtmfDialpad(true);\n };\n\n const drawerContainerStylesValue = useMemo(() => drawerContainerStyles(10), []);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n return callCompositeContainerCSS;\n return { display: 'flex', width: '100%', height: '100%' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n let errorBarProps = props.errorBarProps;\n\n /* @conditional-compile-remove(rooms) */\n // TODO: move this logic to the error bar selector once role is plumbed from the headless SDK\n if (!rolePermissions.cameraButton && props.errorBarProps) {\n errorBarProps = {\n ...props.errorBarProps,\n activeErrorMessages: props.errorBarProps.activeErrorMessages.filter(\n (e) => e.type !== 'callCameraAccessDenied' && e.type !== 'callCameraAccessDeniedSafari'\n )\n };\n }\n /* @conditional-compile-remove(close-captions) */\n const isTeamsCall = useSelector(getIsTeamsCall);\n /* @conditional-compile-remove(close-captions) */\n const hasJoinedCall = useSelector(getCallStatus) === 'Connected';\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)} id={props.id}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack grow styles={callArrangementContainerStyles}>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n {isLegacyCallControlEnabled(props.callControlProps?.options) ? (\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n ) : (\n <CommonCallControlBar\n {...props.callControlProps}\n callControls={props.callControlProps.options}\n callAdapter={adapter as CallAdapter}\n mobileView={props.mobileView}\n disableButtonsForLobbyPage={isInLobby}\n peopleButtonChecked={activePane === 'people'}\n onPeopleButtonClicked={togglePeoplePane}\n onMoreButtonClicked={onMoreButtonClicked}\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported={isTeamsCall && hasJoinedCall}\n />\n )}\n </Stack.Item>\n )}\n {props.callControlProps?.options !== false && showDrawer && (\n <Stack styles={drawerContainerStylesValue}>\n <PreparedMoreDrawer\n callControls={props.callControlProps.options}\n onLightDismiss={closeDrawer}\n onPeopleButtonClicked={onMoreDrawerPeopleClicked}\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad={alternateCallerId ? onClickShowDialpad : undefined}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disableButtonsForHoldScreen={isInLocalHold}\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported={isTeamsCall && hasJoinedCall}\n />\n </Stack>\n )}\n\n {\n /* @conditional-compile-remove(PSTN-calls) */\n props.callControlProps?.options !== false && showDtmfDialpad && (\n <Stack styles={drawerContainerStylesValue}>\n <SendDtmfDialpad\n isMobile={props.mobileView}\n strings={dialpadStrings}\n showDialpad={showDtmfDialpad}\n onDismissDialpad={onDismissDtmfDialpad}\n />\n </Stack>\n )\n }\n <Stack horizontal grow>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && (\n <MutedNotification {...props.mutedNotificationProps} />\n )}\n </Stack.Item>\n {props.onRenderGalleryContent && props.onRenderGalleryContent()}\n {\n /* @conditional-compile-remove(close-captions) */\n true &&\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ !isInLocalHold && (\n <CaptionsBanner isMobile={props.mobileView} />\n )\n }\n </Stack>\n </Stack.Item>\n </Stack.Item>\n {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n callPaneContent()\n }\n </Stack>\n </Stack>\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CommonCallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\nconst isLegacyCallControlEnabled = (options?: boolean | CallControlOptions): boolean => {\n /* @conditional-compile-remove(new-call-control-bar) */\n return !!options && options !== true && !!options?.legacyControlBarExperience;\n return true;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js
CHANGED
@@ -150,10 +150,10 @@ export const CallControls = (props) => {
|
|
150
150
|
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
|
151
151
|
!props.isMobile && (React.createElement(Participants, { option: options === null || options === void 0 ? void 0 : options.participantsButton, callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, isMobile: props.isMobile, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.participantsButton) })) && (
|
152
152
|
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
|
153
|
-
React.createElement(People, { checked: props.peopleButtonChecked, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-composite-people-button", strings: peopleButtonStrings, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.participantsButton) })),
|
153
|
+
React.createElement(People, { checked: props.peopleButtonChecked, ariaLabel: peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.label, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-composite-people-button", strings: peopleButtonStrings, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.participantsButton) })),
|
154
154
|
isEnabled(options === null || options === void 0 ? void 0 : options.devicesButton) && (React.createElement(Devices, { displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.devicesButton) })),
|
155
155
|
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
|
156
|
-
isEnabled(options === null || options === void 0 ? void 0 : options.moreButton) && moreButtonContextualMenuItems().length > 0 && (React.createElement(MoreButton, { strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() }, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact' })),
|
156
|
+
isEnabled(options === null || options === void 0 ? void 0 : options.moreButton) && moreButtonContextualMenuItems().length > 0 && (React.createElement(MoreButton, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonContextualMenuItems() }, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact' })),
|
157
157
|
customButtons['primary'],
|
158
158
|
isEnabled(options === null || options === void 0 ? void 0 : options.endCallButton) && React.createElement(EndCall, { displayType: options === null || options === void 0 ? void 0 : options.displayType })))));
|
159
159
|
};
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallControls.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGnE,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAgC,4CAAmC;AACtF,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,+DAA+D;AAC/D,OAAO,EAAE,+BAA+B,EAAE,kCAAkC,EAAE,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,2FAA2F;AAC3F,OAAO,EAAE,MAAM,EAAE,M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CAAC,IAAI,6BAA6B,EAAE,CAAC,MAAM,GAAG,CAAC,IAAI,CAC9E,oBAAC,UAAU,IACT,OAAO,EAAE,iBAAiB,EAC1B,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAC/B,SAAS,EAAE,EAAE,KAAK,EAAE,6BAA6B,EAAE,EAAE,EACrD,SAAS,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,SAAS,GAC7C,CACH;gBAE8D,aAAa,CAAC,SAAS,CAAC;gBACxF,SAAS,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,IAAI,oBAAC,OAAO,IAAC,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,GAAI,CACzE,CACF,CACP,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAY,EAAE;IACjD,wCAAwC;IACxC,MAAM,eAAe,GAAG,eAAe,EAAE,CAAC;IAC1C,wCAAwC;IACxC,OAAO,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;IAE9B,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { memoizeFunction, Stack, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { generateCustomControlBarButtons, onFetchCustomButtonPropsTrampoline } from './buttons/Custom';\nimport { Devices } from './buttons/Devices';\nimport { EndCall } from './buttons/EndCall';\nimport { Microphone } from './buttons/Microphone';\nimport { Participants } from './buttons/Participants';\nimport { ScreenShare } from './buttons/ScreenShare';\nimport { ContainerRectProps } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\n\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n peopleButtonChecked?: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onPeopleButtonClicked?: () => void;\n callInvitationURL?: string;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: boolean | CallControlOptions;\n /**\n * Option to increase the height of the button flyout menu items from 36px to 48px.\n * Recommended for mobile devices.\n */\n increaseFlyoutItemSize?: boolean;\n isMobile?: boolean;\n};\n\n// Enforce a background color on control bar to ensure it matches the composite background color.\nconst controlBarStyles = memoizeFunction((background: string) => ({ root: { background: background } }));\n\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const peopleButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.peopleButtonLabel,\n tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,\n tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.moreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,\n placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n const moreButtonContextualMenuItems = (): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n\n if (props.isMobile && props.onPeopleButtonClicked && isEnabled(options?.participantsButton)) {\n items.push({\n key: 'peopleButtonKey',\n text: localeStrings.component.strings.participantsButton.label,\n onClick: () => {\n if (props.onPeopleButtonClicked) {\n props.onPeopleButtonClicked();\n }\n },\n iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.participantsButton),\n ['data-ui-id']: 'call-composite-more-menu-people-button'\n });\n }\n\n if (!isRoomsCallTrampoline()) {\n items.push({\n key: 'holdButtonKey',\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onClick: () => {\n holdButtonProps.onToggleHold();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.holdButton),\n ['data-ui-id']: 'hold-button'\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n // dtmf tone sending only works for 1:1 PSTN call\n if (alternateCallerId) {\n items.push({\n key: 'showDialpadKey',\n text: localeStrings.strings.call.openDtmfDialpadLabel,\n onClick: () => {\n setShowDialpad(true);\n },\n iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n }\n });\n }\n\n return items;\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customButtons = useMemo(\n () => generateCustomControlBarButtons(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\n\n // when props.options is false then we want to hide the whole control bar.\n if (props.options === false) {\n return <></>;\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n /* @conditional-compile-remove(rooms) */\n screenShareButtonIsEnabled = rolePermissions.screenShare && screenShareButtonIsEnabled;\n\n let microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n /* @conditional-compile-remove(rooms) */\n microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;\n\n let cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n /* @conditional-compile-remove(rooms) */\n cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;\n\n return (\n <Stack horizontalAlign=\"center\">\n {\n /* @conditional-compile-remove(PSTN-calls) */\n <SendDtmfDialpad\n isMobile={!!props.isMobile}\n strings={dialpadStrings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n />\n }\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <ControlBar layout=\"horizontal\" styles={controlBarStyles(theme.semanticColors.bodyBackground)}>\n {microphoneButtonIsEnabled && (\n <Microphone displayType={options?.displayType} disabled={isDisabled(options?.microphoneButton)} />\n )}\n {cameraButtonIsEnabled && (\n <Camera displayType={options?.displayType} disabled={isDisabled(options?.cameraButton)} />\n )}\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile && (\n <Participants\n option={options?.participantsButton}\n callInvitationURL={props.callInvitationURL}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n isMobile={props.isMobile}\n disabled={isDisabled(options?.participantsButton)}\n />\n ) && (\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n <People\n checked={props.peopleButtonChecked}\n showLabel={options?.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"call-composite-people-button\"\n strings={peopleButtonStrings}\n disabled={isDisabled(options?.participantsButton)}\n />\n )}\n {isEnabled(options?.devicesButton) && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n isEnabled(options?.moreButton) && moreButtonContextualMenuItems().length > 0 && (\n <MoreButton\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonContextualMenuItems() }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {/* @conditional-compile-remove(control-bar-button-injection) */ customButtons['primary']}\n {isEnabled(options?.endCallButton) && <EndCall displayType={options?.displayType} />}\n </ControlBar>\n </Stack.Item>\n </Stack>\n );\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/** @private */\nexport const isRoomsCallTrampoline = (): boolean => {\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n return !!rolePermissions.role;\n\n return false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
|
1
|
+
{"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallControls.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGnE,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEj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,CACzE,CACF,CACP,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAY,EAAE;IACjD,wCAAwC;IACxC,MAAM,eAAe,GAAG,eAAe,EAAE,CAAC;IAC1C,wCAAwC;IACxC,OAAO,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC;IAE9B,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { memoizeFunction, Stack, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { generateCustomControlBarButtons, onFetchCustomButtonPropsTrampoline } from './buttons/Custom';\nimport { Devices } from './buttons/Devices';\nimport { EndCall } from './buttons/EndCall';\nimport { Microphone } from './buttons/Microphone';\nimport { Participants } from './buttons/Participants';\nimport { ScreenShare } from './buttons/ScreenShare';\nimport { ContainerRectProps } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\n\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n peopleButtonChecked?: boolean;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n onPeopleButtonClicked?: () => void;\n callInvitationURL?: string;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: boolean | CallControlOptions;\n /**\n * Option to increase the height of the button flyout menu items from 36px to 48px.\n * Recommended for mobile devices.\n */\n increaseFlyoutItemSize?: boolean;\n isMobile?: boolean;\n};\n\n// Enforce a background color on control bar to ensure it matches the composite background color.\nconst controlBarStyles = memoizeFunction((background: string) => ({ root: { background: background } }));\n\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const peopleButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.peopleButtonLabel,\n tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,\n tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.moreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,\n placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n const moreButtonContextualMenuItems = (): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n\n if (props.isMobile && props.onPeopleButtonClicked && isEnabled(options?.participantsButton)) {\n items.push({\n key: 'peopleButtonKey',\n text: localeStrings.component.strings.participantsButton.label,\n onClick: () => {\n if (props.onPeopleButtonClicked) {\n props.onPeopleButtonClicked();\n }\n },\n iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.participantsButton),\n ['data-ui-id']: 'call-composite-more-menu-people-button'\n });\n }\n\n if (!isRoomsCallTrampoline()) {\n items.push({\n key: 'holdButtonKey',\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onClick: () => {\n holdButtonProps.onToggleHold();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.holdButton),\n ['data-ui-id']: 'hold-button'\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n // dtmf tone sending only works for 1:1 PSTN call\n if (alternateCallerId) {\n items.push({\n key: 'showDialpadKey',\n text: localeStrings.strings.call.openDtmfDialpadLabel,\n onClick: () => {\n setShowDialpad(true);\n },\n iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n }\n });\n }\n\n return items;\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customButtons = useMemo(\n () => generateCustomControlBarButtons(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\n\n // when props.options is false then we want to hide the whole control bar.\n if (props.options === false) {\n return <></>;\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n /* @conditional-compile-remove(rooms) */\n screenShareButtonIsEnabled = rolePermissions.screenShare && screenShareButtonIsEnabled;\n\n let microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n /* @conditional-compile-remove(rooms) */\n microphoneButtonIsEnabled = rolePermissions.microphoneButton && microphoneButtonIsEnabled;\n\n let cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n /* @conditional-compile-remove(rooms) */\n cameraButtonIsEnabled = rolePermissions.cameraButton && cameraButtonIsEnabled;\n\n return (\n <Stack horizontalAlign=\"center\">\n {\n /* @conditional-compile-remove(PSTN-calls) */\n <SendDtmfDialpad\n isMobile={!!props.isMobile}\n strings={dialpadStrings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n />\n }\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <ControlBar layout=\"horizontal\" styles={controlBarStyles(theme.semanticColors.bodyBackground)}>\n {microphoneButtonIsEnabled && (\n <Microphone displayType={options?.displayType} disabled={isDisabled(options?.microphoneButton)} />\n )}\n {cameraButtonIsEnabled && (\n <Camera displayType={options?.displayType} disabled={isDisabled(options?.cameraButton)} />\n )}\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile && (\n <Participants\n option={options?.participantsButton}\n callInvitationURL={props.callInvitationURL}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n isMobile={props.isMobile}\n disabled={isDisabled(options?.participantsButton)}\n />\n ) && (\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n <People\n checked={props.peopleButtonChecked}\n ariaLabel={peopleButtonStrings?.label}\n showLabel={options?.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"call-composite-people-button\"\n strings={peopleButtonStrings}\n disabled={isDisabled(options?.participantsButton)}\n />\n )}\n {isEnabled(options?.devicesButton) && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n isEnabled(options?.moreButton) && moreButtonContextualMenuItems().length > 0 && (\n <MoreButton\n data-ui-id=\"common-call-composite-more-button\"\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonContextualMenuItems() }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {/* @conditional-compile-remove(control-bar-button-injection) */ customButtons['primary']}\n {isEnabled(options?.endCallButton) && <EndCall displayType={options?.displayType} />}\n </ControlBar>\n </Stack.Item>\n </Stack>\n );\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/** @private */\nexport const isRoomsCallTrampoline = (): boolean => {\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n /* @conditional-compile-remove(rooms) */\n return !!rolePermissions.role;\n\n return false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js
CHANGED
@@ -21,7 +21,7 @@ import { getLocalMicrophoneEnabled } from '../selectors/baseSelectors';
|
|
21
21
|
import { devicePermissionSelector } from '../selectors/devicePermissionSelector';
|
22
22
|
import { localPreviewSelector } from '../selectors/localPreviewSelector';
|
23
23
|
import { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';
|
24
|
-
import { cameraOffLabelStyle, localPreviewContainerStyleDesktop, localPreviewContainerStyleMobile, localPreviewTileStyle } from '../styles/LocalPreview.styles';
|
24
|
+
import { cameraOffLabelStyle, localPreviewButtonStyle, localPreviewContainerStyleDesktop, localPreviewContainerStyleMobile, localPreviewTileStyle } from '../styles/LocalPreview.styles';
|
25
25
|
/**
|
26
26
|
* @private
|
27
27
|
*/
|
@@ -59,8 +59,8 @@ export const LocalPreview = (props) => {
|
|
59
59
|
return (React.createElement(Stack, { "data-ui-id": "call-composite-local-preview", className: props.mobileView ? localPreviewContainerStyleMobile : localPreviewContainerStyleDesktop },
|
60
60
|
React.createElement(VideoTile, { styles: localPreviewTileStyle, renderElement: (localPreviewProps === null || localPreviewProps === void 0 ? void 0 : localPreviewProps.videoStreamElement) ? (React.createElement(StreamMedia, { videoStreamElement: localPreviewProps.videoStreamElement })) : undefined, onRenderPlaceholder: onRenderPlaceholder },
|
61
61
|
React.createElement(ControlBar, { layout: "floatingBottom" },
|
62
|
-
React.createElement(MicrophoneButton, { "data-ui-id": "call-composite-local-device-settings-microphone-button", checked: isLocalMicrophoneEnabled, onToggleMicrophone: onToggleMic, disabled: !microphonePermissionGranted || !hasMicrophones, showLabel: true }),
|
63
|
-
React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-local-device-settings-camera-button" }, cameraButtonProps, { showLabel: true, disabled: !cameraPermissionGranted || !hasCameras })),
|
62
|
+
React.createElement(MicrophoneButton, { "data-ui-id": "call-composite-local-device-settings-microphone-button", checked: isLocalMicrophoneEnabled, onToggleMicrophone: onToggleMic, disabled: !microphonePermissionGranted || !hasMicrophones, showLabel: true, styles: localPreviewButtonStyle }),
|
63
|
+
React.createElement(CameraButton, Object.assign({ "data-ui-id": "call-composite-local-device-settings-camera-button" }, cameraButtonProps, { showLabel: true, disabled: !cameraPermissionGranted || !hasCameras, styles: localPreviewButtonStyle })),
|
64
64
|
props.showDevicesButton && (React.createElement(DevicesButton, Object.assign({ "data-ui-id": "call-composite-local-device-settings-options-button" }, devicesButtonProps, {
|
65
65
|
// disable button whilst all other buttons are disabled
|
66
66
|
disabled: !microphonePermissionGranted || !cameraPermissionGranted || hasNoDevices, showLabel: true, styles: devicesButtonStyles })))))));
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalPreview.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/LocalPreview.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC3D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B,EAAE,CAAC,IACzF,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAC/B,CACI,CACP,CACT,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAEjD,MAAM,mBAAmB,GAAG,KAAK,CAAC,UAAU;QAC1C,CAAC,CAAC;YACE,UAAU,EAAE;gBACV,cAAc,EAAE,+BAA+B;aAChD;SACF;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO,CACL,oBAAC,KAAK,kBACO,8BAA8B,EACzC,SAAS,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,iCAAiC;QAElG,oBAAC,SAAS,IACR,MAAM,EAAE,qBAAqB,EAC7B,aAAa,EACX,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,kBAAkB,EAAC,CAAC,CAAC,CACtC,oBAAC,WAAW,IAAC,kBAAkB,EAAE,iBAAiB,CAAC,kBAAkB,GAAI,CAC1E,CAAC,CAAC,CAAC,SAAS,EAEf,mBAAmB,EAAE,mBAAmB;YAExC,oBAAC,UAAU,IAAC,MAAM,EAAC,gBAAgB;gBACjC,oBAAC,gBAAgB,kBACJ,wDAAwD,EACnE,OAAO,EAAE,wBAAwB,EACjC,kBAAkB,EAAE,WAAW,EAC/B,QAAQ,EAAE,CAAC,2BAA2B,IAAI,CAAC,cAAc,EACzD,SAAS,EAAE,IAAI,
|
1
|
+
{"version":3,"file":"LocalPreview.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/LocalPreview.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,a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2BAA2B,IAAI,CAAC,uBAAuB,IAAI,YAAY,EAClF,SAAS,EAAE,IAAI,EACf,MAAM,EAAE,mBAAmB,IAC3B,CACH,CACU,CACH,CACN,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack, Text } from '@fluentui/react';\nimport {\n CameraButton,\n ControlBar,\n MicrophoneButton,\n DevicesButton,\n StreamMedia,\n useTheme,\n VideoTile\n} from '@internal/react-components';\nimport React, { useCallback } from 'react';\nimport { CallCompositeIcon } from '../../common/icons';\nimport { useLocale } from '../../localization';\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { useSelector } from '../hooks/useSelector';\nimport { getLocalMicrophoneEnabled } from '../selectors/baseSelectors';\nimport { devicePermissionSelector } from '../selectors/devicePermissionSelector';\nimport { localPreviewSelector } from '../selectors/localPreviewSelector';\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\nimport {\n cameraOffLabelStyle,\n localPreviewButtonStyle,\n localPreviewContainerStyleDesktop,\n localPreviewContainerStyleMobile,\n localPreviewTileStyle\n} from '../styles/LocalPreview.styles';\n\n/**\n * @private\n */\nexport interface LocalPreviewProps {\n mobileView: boolean;\n showDevicesButton: boolean;\n}\n\n/**\n * @private\n */\nexport const LocalPreview = (props: LocalPreviewProps): JSX.Element => {\n const locale = useLocale();\n const cameraButtonProps = usePropsFor(CameraButton);\n const localPreviewProps = useSelector(localPreviewSelector);\n const devicesButtonProps = usePropsFor(DevicesButton);\n const { audio: microphonePermissionGranted, video: cameraPermissionGranted } = useSelector(devicePermissionSelector);\n\n const isLocalMicrophoneEnabled = useSelector(getLocalMicrophoneEnabled);\n const adapter = useAdapter();\n\n const onToggleMic = useCallback(async () => {\n isLocalMicrophoneEnabled ? adapter.mute() : adapter.unmute();\n }, [adapter, isLocalMicrophoneEnabled]);\n\n const hasNoDevices =\n devicesButtonProps.cameras.length === 0 &&\n devicesButtonProps.microphones.length === 0 &&\n devicesButtonProps.speakers.length === 0;\n\n const hasCameras = devicesButtonProps.cameras.length > 0;\n const hasMicrophones = devicesButtonProps.microphones.length > 0;\n\n const theme = useTheme();\n const onRenderPlaceholder = useCallback((): JSX.Element => {\n return (\n <Stack\n className={mergeStyles({ width: '100%', height: '100%' })}\n verticalAlign=\"center\"\n tokens={{ childrenGap: '0.25rem' }}\n >\n <Stack.Item align=\"center\">\n <CallCompositeIcon\n iconName=\"LocalPreviewPlaceholder\"\n className={mergeStyles(cameraOffLabelStyle, { color: theme.palette.neutralTertiary })}\n />\n </Stack.Item>\n <Stack.Item align=\"center\">\n <Text className={mergeStyles(cameraOffLabelStyle, { color: theme.palette.neutralSecondary })}>\n {locale.strings.call.cameraTurnedOff}\n </Text>\n </Stack.Item>\n </Stack>\n );\n }, [theme, locale.strings.call.cameraTurnedOff]);\n\n const devicesButtonStyles = props.mobileView\n ? {\n menuStyles: {\n menuItemStyles: buttonFlyoutIncreasedSizeStyles\n }\n }\n : undefined;\n\n return (\n <Stack\n data-ui-id=\"call-composite-local-preview\"\n className={props.mobileView ? localPreviewContainerStyleMobile : localPreviewContainerStyleDesktop}\n >\n <VideoTile\n styles={localPreviewTileStyle}\n renderElement={\n localPreviewProps?.videoStreamElement ? (\n <StreamMedia videoStreamElement={localPreviewProps.videoStreamElement} />\n ) : undefined\n }\n onRenderPlaceholder={onRenderPlaceholder}\n >\n <ControlBar layout=\"floatingBottom\">\n <MicrophoneButton\n data-ui-id=\"call-composite-local-device-settings-microphone-button\"\n checked={isLocalMicrophoneEnabled}\n onToggleMicrophone={onToggleMic}\n disabled={!microphonePermissionGranted || !hasMicrophones}\n showLabel={true}\n styles={localPreviewButtonStyle}\n />\n <CameraButton\n data-ui-id=\"call-composite-local-device-settings-camera-button\"\n {...cameraButtonProps}\n showLabel={true}\n disabled={!cameraPermissionGranted || !hasCameras}\n styles={localPreviewButtonStyle}\n />\n {props.showDevicesButton && (\n <DevicesButton\n data-ui-id=\"call-composite-local-device-settings-options-button\"\n {...devicesButtonProps}\n // disable button whilst all other buttons are disabled\n disabled={!microphonePermissionGranted || !cameraPermissionGranted || hasNoDevices}\n showLabel={true}\n styles={devicesButtonStyles}\n />\n )}\n </ControlBar>\n </VideoTile>\n </Stack>\n );\n};\n\"../../../../../react-components/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT license.
|
3
3
|
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
4
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
5
|
+
import { useRef } from 'react';
|
4
6
|
import { VideoGallery, Announcer } from "../../../../../react-components/src";
|
7
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
8
|
+
import { _useContainerWidth, _useContainerHeight } from "../../../../../react-components/src";
|
5
9
|
import { usePropsFor } from '../hooks/usePropsFor';
|
6
10
|
import { AvatarPersona } from '../../common/AvatarPersona';
|
7
11
|
import { mergeStyles, Stack } from '@fluentui/react';
|
@@ -34,6 +38,12 @@ export const MediaGallery = (props) => {
|
|
34
38
|
const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);
|
35
39
|
const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);
|
36
40
|
const announcerString = useParticipantChangedAnnouncement();
|
41
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
42
|
+
const containerRef = useRef(null);
|
43
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
44
|
+
const containerWidth = _useContainerWidth(containerRef);
|
45
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
46
|
+
const containerHeight = _useContainerHeight(containerRef);
|
37
47
|
const cameraSwitcherProps = useMemo(() => {
|
38
48
|
return Object.assign(Object.assign({}, cameraSwitcherCallback), cameraSwitcherCameras);
|
39
49
|
}, [cameraSwitcherCallback, cameraSwitcherCameras]);
|
@@ -52,18 +62,25 @@ export const MediaGallery = (props) => {
|
|
52
62
|
? { kind: 'drawer', hostId: props.drawerMenuHostId }
|
53
63
|
: { kind: 'contextual' };
|
54
64
|
}, [(_a = props.remoteVideoTileMenuOptions) === null || _a === void 0 ? void 0 : _a.isHidden, props.isMobile, props.drawerMenuHostId]);
|
65
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
66
|
+
const overflowGalleryPosition = useMemo(() => containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9
|
67
|
+
? 'VerticalRight'
|
68
|
+
: 'HorizontalBottom', [containerWidth, containerHeight]);
|
55
69
|
const VideoGalleryMemoized = useMemo(() => {
|
56
70
|
return (React.createElement(VideoGallery, Object.assign({}, videoGalleryProps, { localVideoViewOptions: localVideoViewOptions, remoteVideoViewOptions: remoteVideoViewOptions, styles: VideoGalleryStyles, layout: "floatingLocalVideo", showCameraSwitcherInLocalPreview: props.isMobile, localVideoCameraCycleButtonProps: cameraSwitcherProps, onRenderAvatar: onRenderAvatar,
|
57
71
|
/* @conditional-compile-remove(pinned-participants) */
|
58
|
-
remoteVideoTileMenuOptions: remoteVideoTileMenuOptions
|
72
|
+
remoteVideoTileMenuOptions: remoteVideoTileMenuOptions,
|
73
|
+
/* @conditional-compile-remove(vertical-gallery) */
|
74
|
+
overflowGalleryPosition: overflowGalleryPosition })));
|
59
75
|
}, [
|
60
76
|
videoGalleryProps,
|
61
77
|
props.isMobile,
|
62
78
|
onRenderAvatar,
|
63
79
|
cameraSwitcherProps,
|
64
|
-
/* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions
|
80
|
+
/* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions,
|
81
|
+
/* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition
|
65
82
|
]);
|
66
|
-
return (React.createElement(
|
83
|
+
return (React.createElement("div", { ref: containerRef, style: mediaGalleryContainerStyles },
|
67
84
|
React.createElement(Announcer, { announcementString: announcerString, ariaLive: 'polite' }),
|
68
85
|
VideoGalleryMemoized));
|
69
86
|
};
|
@@ -93,4 +110,5 @@ export const useLocalVideoStartTrigger = (isLocalVideoAvailable, shouldTransitio
|
|
93
110
|
}
|
94
111
|
}, [shouldTransition, isButtonStatusSynced, isPreviewCameraOn, isLocalVideoAvailable, mediaGalleryHandlers]);
|
95
112
|
};
|
113
|
+
const mediaGalleryContainerStyles = { width: '100%', height: '100%' };
|
96
114
|
//# sourceMappingURL=MediaGallery.js.map
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/MediaGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EACL,YAAY,EAIZ,SAAS,EACV,4CAAmC;AAGpC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAA6B,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAC1F,OAAO,EAAE,2BAA2B,EAAE,4CAAmC;AAEzE,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAI/E,MAAM,kBAAkB,GAAG;IACzB,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,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qEAAqE;IACrE,sBAAsB;IACtB,mBAAmB;IACnB,4EAA4E;IAC5E,EAAE;IACF,2EAA2E;IAC3E,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxE,MAAM,iBAAiB,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAC5D,MAAM,oBAAoB,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;IACvD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,gBAAgB,KAAK,KAAK,EAAE;YAC9B,IAAI,iBAAiB,IAAI,CAAC,qBAAqB,IAAI,CAAC,oBAAoB,EAAE;gBACxE,oBAAoB,CAAC,iBAAiB,EAAE,CAAC;aAC1C;YACD,uBAAuB,CAAC,IAAI,CAAC,CAAC;SAC/B;IACH,CAAC,EAAE,CAAC,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,oBAAoB,CAAC,CAAC,CAAC;AAC/G,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n VideoGallery,\n VideoStreamOptions,\n OnRenderAvatarCallback,\n CustomAvatarOptions,\n Announcer\n} from '@internal/react-components';\n/* @conditional-compile-remove(pinned-participants) */\nimport { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '@internal/react-components';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { AvatarPersona, AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { getIsPreviewCameraOn } from '../selectors/baseSelectors';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useSelector } from '../hooks/useSelector';\nimport { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';\nimport { LocalVideoCameraCycleButton } from '@internal/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';\n/* @conditional-compile-remove(pinned-participants) */\nimport { RemoteVideoTileMenuOptions } from '../CallComposite';\n\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem', // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\nconst remoteVideoViewOptions = {\n scalingMode: 'Crop'\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface MediaGalleryProps {\n isVideoStreamOn?: boolean;\n isMicrophoneChecked?: boolean;\n onStartLocalVideo: () => Promise<void>;\n onRenderAvatar?: OnRenderAvatarCallback;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n isMobile?: boolean;\n drawerMenuHostId?: string;\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={{ root: { margin: 'auto', maxHeight: '100%' } }}>\n <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />\n </Stack>\n </Stack>\n );\n },\n [props.onFetchAvatarPersonaData]\n );\n\n useLocalVideoStartTrigger(!!props.isVideoStreamOn);\n\n /* @conditional-compile-remove(pinned-participants) */\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden\n ? false\n : props.isMobile\n ? { kind: 'drawer', hostId: props.drawerMenuHostId }\n : { kind: 'contextual' };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n const VideoGalleryMemoized = useMemo(() => {\n return (\n <VideoGallery\n {...videoGalleryProps}\n localVideoViewOptions={localVideoViewOptions}\n remoteVideoViewOptions={remoteVideoViewOptions}\n styles={VideoGalleryStyles}\n layout=\"floatingLocalVideo\"\n showCameraSwitcherInLocalPreview={props.isMobile}\n localVideoCameraCycleButtonProps={cameraSwitcherProps}\n onRenderAvatar={onRenderAvatar}\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions={remoteVideoTileMenuOptions}\n />\n );\n }, [\n videoGalleryProps,\n props.isMobile,\n onRenderAvatar,\n cameraSwitcherProps,\n /* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions\n ]);\n\n return (\n <>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </>\n );\n};\n\n/**\n * @private\n *\n * `shouldTransition` is an extra predicate that controls whether this hooks actually transitions the call.\n * The rule of hooks disallows calling the hook conditionally, so this predicate can be used to make the decision.\n */\nexport const useLocalVideoStartTrigger = (isLocalVideoAvailable: boolean, shouldTransition?: boolean): void => {\n // Once a call is joined, we need to transition the local preview camera setting into the call.\n // This logic is needed on any screen that we might join a call from:\n // - The Media gallery\n // - The lobby page\n // - The networkReconnect interstitial that may show at the start of a call.\n //\n // @TODO: Can we simply have the callHandlers handle this transition logic.\n const [isButtonStatusSynced, setIsButtonStatusSynced] = useState(false);\n const isPreviewCameraOn = useSelector(getIsPreviewCameraOn);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n useEffect(() => {\n if (shouldTransition !== false) {\n if (isPreviewCameraOn && !isLocalVideoAvailable && !isButtonStatusSynced) {\n mediaGalleryHandlers.onStartLocalVideo();\n }\n setIsButtonStatusSynced(true);\n }\n }, [shouldTransition, isButtonStatusSynced, isPreviewCameraOn, isLocalVideoAvailable, mediaGalleryHandlers]);\n};\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
|
1
|
+
{"version":3,"file":"MediaGallery.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/MediaGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAiB,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxF,mDAAmD;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,YAAY,EAIZ,SAAS,EACV,4CAAmC;AACpC,mDAAmD;AACnD,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,4CAAmC;AAGrF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,aAAa,EAA6B,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,mCAAmC,EAAE,MAAM,qCAAqC,CAAC;AAC1F,OAAO,EAAE,2BAA2B,EAAE,4CAAmC;AAEzE,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAI/E,MAAM,kBAAkB,GAAG;IACzB,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAE,MAAM;KACjB;CACF,CAAC;AAEF,MAAM,qBAAqB,GAAG;IAC5B,WAA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c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { CSSProperties, useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { useRef } from 'react';\nimport {\n VideoGallery,\n VideoStreamOptions,\n OnRenderAvatarCallback,\n CustomAvatarOptions,\n Announcer\n} from '@internal/react-components';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { _useContainerWidth, _useContainerHeight } from '@internal/react-components';\n/* @conditional-compile-remove(pinned-participants) */\nimport { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '@internal/react-components';\nimport { usePropsFor } from '../hooks/usePropsFor';\nimport { AvatarPersona, AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { getIsPreviewCameraOn } from '../selectors/baseSelectors';\nimport { useHandlers } from '../hooks/useHandlers';\nimport { useSelector } from '../hooks/useSelector';\nimport { localVideoCameraCycleButtonSelector } from '../selectors/LocalVideoTileSelector';\nimport { LocalVideoCameraCycleButton } from '@internal/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useParticipantChangedAnnouncement } from '../utils/MediaGalleryUtils';\n/* @conditional-compile-remove(pinned-participants) */\nimport { RemoteVideoTileMenuOptions } from '../CallComposite';\n\nconst VideoGalleryStyles = {\n root: {\n height: '100%',\n minHeight: '10rem', // space affordance to ensure media gallery is never collapsed\n minWidth: '6rem'\n }\n};\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\nconst remoteVideoViewOptions = {\n scalingMode: 'Crop'\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface MediaGalleryProps {\n isVideoStreamOn?: boolean;\n isMicrophoneChecked?: boolean;\n onStartLocalVideo: () => Promise<void>;\n onRenderAvatar?: OnRenderAvatarCallback;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n isMobile?: boolean;\n drawerMenuHostId?: string;\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions?: RemoteVideoTileMenuOptions;\n}\n\n/**\n * @private\n */\nexport const MediaGallery = (props: MediaGalleryProps): JSX.Element => {\n const videoGalleryProps = usePropsFor(VideoGallery);\n const cameraSwitcherCameras = useSelector(localVideoCameraCycleButtonSelector);\n const cameraSwitcherCallback = useHandlers(LocalVideoCameraCycleButton);\n const announcerString = useParticipantChangedAnnouncement();\n\n /* @conditional-compile-remove(vertical-gallery) */\n const containerRef = useRef<HTMLDivElement>(null);\n /* @conditional-compile-remove(vertical-gallery) */\n const containerWidth = _useContainerWidth(containerRef);\n /* @conditional-compile-remove(vertical-gallery) */\n const containerHeight = _useContainerHeight(containerRef);\n\n const cameraSwitcherProps = useMemo(() => {\n return {\n ...cameraSwitcherCallback,\n ...cameraSwitcherCameras\n };\n }, [cameraSwitcherCallback, cameraSwitcherCameras]);\n\n const onRenderAvatar = useCallback(\n (userId?: string, options?: CustomAvatarOptions) => {\n return (\n <Stack className={mergeStyles({ position: 'absolute', height: '100%', width: '100%' })}>\n <Stack styles={{ root: { margin: 'auto', maxHeight: '100%' } }}>\n <AvatarPersona userId={userId} {...options} dataProvider={props.onFetchAvatarPersonaData} />\n </Stack>\n </Stack>\n );\n },\n [props.onFetchAvatarPersonaData]\n );\n\n useLocalVideoStartTrigger(!!props.isVideoStreamOn);\n\n /* @conditional-compile-remove(pinned-participants) */\n const remoteVideoTileMenuOptions: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps = useMemo(() => {\n return props.remoteVideoTileMenuOptions?.isHidden\n ? false\n : props.isMobile\n ? { kind: 'drawer', hostId: props.drawerMenuHostId }\n : { kind: 'contextual' };\n }, [props.remoteVideoTileMenuOptions?.isHidden, props.isMobile, props.drawerMenuHostId]);\n\n /* @conditional-compile-remove(vertical-gallery) */\n const overflowGalleryPosition = useMemo(\n () =>\n containerWidth && containerHeight && containerWidth / containerHeight >= 16 / 9\n ? 'VerticalRight'\n : 'HorizontalBottom',\n [containerWidth, containerHeight]\n );\n\n const VideoGalleryMemoized = useMemo(() => {\n return (\n <VideoGallery\n {...videoGalleryProps}\n localVideoViewOptions={localVideoViewOptions}\n remoteVideoViewOptions={remoteVideoViewOptions}\n styles={VideoGalleryStyles}\n layout=\"floatingLocalVideo\"\n showCameraSwitcherInLocalPreview={props.isMobile}\n localVideoCameraCycleButtonProps={cameraSwitcherProps}\n onRenderAvatar={onRenderAvatar}\n /* @conditional-compile-remove(pinned-participants) */\n remoteVideoTileMenuOptions={remoteVideoTileMenuOptions}\n /* @conditional-compile-remove(vertical-gallery) */\n overflowGalleryPosition={overflowGalleryPosition}\n />\n );\n }, [\n videoGalleryProps,\n props.isMobile,\n onRenderAvatar,\n cameraSwitcherProps,\n /* @conditional-compile-remove(pinned-participants) */ remoteVideoTileMenuOptions,\n /* @conditional-compile-remove(vertical-gallery) */ overflowGalleryPosition\n ]);\n\n return (\n <div /* @conditional-compile-remove(vertical-gallery) */ ref={containerRef} style={mediaGalleryContainerStyles}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n {VideoGalleryMemoized}\n </div>\n );\n};\n\n/**\n * @private\n *\n * `shouldTransition` is an extra predicate that controls whether this hooks actually transitions the call.\n * The rule of hooks disallows calling the hook conditionally, so this predicate can be used to make the decision.\n */\nexport const useLocalVideoStartTrigger = (isLocalVideoAvailable: boolean, shouldTransition?: boolean): void => {\n // Once a call is joined, we need to transition the local preview camera setting into the call.\n // This logic is needed on any screen that we might join a call from:\n // - The Media gallery\n // - The lobby page\n // - The networkReconnect interstitial that may show at the start of a call.\n //\n // @TODO: Can we simply have the callHandlers handle this transition logic.\n const [isButtonStatusSynced, setIsButtonStatusSynced] = useState(false);\n const isPreviewCameraOn = useSelector(getIsPreviewCameraOn);\n const mediaGalleryHandlers = useHandlers(MediaGallery);\n useEffect(() => {\n if (shouldTransition !== false) {\n if (isPreviewCameraOn && !isLocalVideoAvailable && !isButtonStatusSynced) {\n mediaGalleryHandlers.onStartLocalVideo();\n }\n setIsButtonStatusSynced(true);\n }\n }, [shouldTransition, isButtonStatusSynced, isPreviewCameraOn, isLocalVideoAvailable, mediaGalleryHandlers]);\n};\n\nconst mediaGalleryContainerStyles: CSSProperties = { width: '100%', height: '100%' };\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
|
@@ -24,7 +24,7 @@ export const NetworkReconnectTile = (props) => {
|
|
24
24
|
useLocalVideoStartTrigger(!!props.localParticipantVideoStream.isAvailable);
|
25
25
|
return (React.createElement(ExpandedLocalVideoTile, Object.assign({ localParticipantVideoStream: props.localParticipantVideoStream, overlayContent: React.createElement(Stack, { verticalFill: true, horizontalAlign: "center", verticalAlign: "center", className: mergeStyles(containerStyle), "aria-atomic": true },
|
26
26
|
React.createElement(Stack, { horizontal: true, className: mergeStyles(titleContainerStyle) },
|
27
|
-
React.createElement(CallCompositeIcon, { iconName: "NetworkReconnectIcon", className: mergeStyles(titleStyle) }),
|
27
|
+
React.createElement(CallCompositeIcon, { iconName: "NetworkReconnectIcon", className: mergeStyles(titleStyle(palette, isVideoReady)) }),
|
28
28
|
React.createElement(Text, { className: mergeStyles(titleStyle(palette, isVideoReady)), "aria-live": 'assertive' }, strings.networkReconnectTitle)),
|
29
29
|
React.createElement(Text, { className: mergeStyles(moreDetailsStyle(palette, isVideoReady)), "aria-live": 'assertive' }, strings.networkReconnectMoreDetails)) }, handlers)));
|
30
30
|
};
|