@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
@@ -1,12 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { PartialTheme, Theme } from '@fluentui/react';
|
3
|
-
import { CallControlDisplayType } from '../CallComposite';
|
4
3
|
import { CallWithChatAdapter } from './adapter/CallWithChatAdapter';
|
5
4
|
import { BaseCompositeProps } from '../common/BaseComposite';
|
6
5
|
import { CallWithChatCompositeIcons } from '../common/icons';
|
7
6
|
import { FileSharingOptions } from '../ChatComposite';
|
8
|
-
import { CustomCallWithChatControlButtonCallback } from './CustomButton';
|
9
7
|
import { DeviceCheckOptions } from '../CallComposite/CallComposite';
|
8
|
+
import { CommonCallControlOptions } from '../common/types/CommonCallControlOptions';
|
10
9
|
/**
|
11
10
|
* Props required for the {@link CallWithChatComposite}
|
12
11
|
*
|
@@ -35,6 +34,20 @@ export interface CallWithChatCompositeProps extends BaseCompositeProps<CallWithC
|
|
35
34
|
*/
|
36
35
|
options?: CallWithChatCompositeOptions;
|
37
36
|
}
|
37
|
+
/**
|
38
|
+
* Customization options for the control bar in calling with chat experience.
|
39
|
+
*
|
40
|
+
* @public
|
41
|
+
*/
|
42
|
+
export interface CallWithChatControlOptions extends CommonCallControlOptions {
|
43
|
+
/**
|
44
|
+
* Show or hide the chat button in the call-with-chat composite control bar.
|
45
|
+
* @defaultValue true
|
46
|
+
*/
|
47
|
+
chatButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
|
48
|
+
disabled: boolean;
|
49
|
+
};
|
50
|
+
}
|
38
51
|
/**
|
39
52
|
* Optional features of the {@link CallWithChatComposite}.
|
40
53
|
*
|
@@ -103,79 +116,6 @@ export declare type CallWithChatCompositeOptions = {
|
|
103
116
|
*/
|
104
117
|
onEnvironmentInfoTroubleshootingClick?: () => void;
|
105
118
|
};
|
106
|
-
/**
|
107
|
-
* {@link CallWithChatComposite} Call controls to show or hide buttons on the calling control bar.
|
108
|
-
*
|
109
|
-
* @public
|
110
|
-
*/
|
111
|
-
export interface CallWithChatControlOptions {
|
112
|
-
/**
|
113
|
-
* {@link CallControlDisplayType} to change how the call controls are displayed.
|
114
|
-
* `'compact'` display type will decreases the size of buttons and hide the labels.
|
115
|
-
*
|
116
|
-
* @remarks
|
117
|
-
* If the composite `formFactor` is set to `'mobile'`, the control bar will always use compact view.
|
118
|
-
*
|
119
|
-
* @defaultValue 'default'
|
120
|
-
*/
|
121
|
-
displayType?: CallControlDisplayType;
|
122
|
-
/**
|
123
|
-
* Show or Hide Microphone button during a call.
|
124
|
-
* @defaultValue true
|
125
|
-
*/
|
126
|
-
microphoneButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
|
127
|
-
disabled: boolean;
|
128
|
-
};
|
129
|
-
/**
|
130
|
-
* Show or Hide Camera Button during a call
|
131
|
-
* @defaultValue true
|
132
|
-
*/
|
133
|
-
cameraButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
|
134
|
-
disabled: boolean;
|
135
|
-
};
|
136
|
-
/**
|
137
|
-
* Show, Hide or Disable the screen share button during a call.
|
138
|
-
* @defaultValue true
|
139
|
-
*/
|
140
|
-
screenShareButton?: boolean | {
|
141
|
-
disabled: boolean;
|
142
|
-
};
|
143
|
-
/**
|
144
|
-
* Show or Hide EndCall button during a call.
|
145
|
-
* @defaultValue true
|
146
|
-
*/
|
147
|
-
endCallButton?: boolean;
|
148
|
-
/**
|
149
|
-
* Show or hide the chat button in the call-with-chat composite control bar.
|
150
|
-
* @defaultValue true
|
151
|
-
*/
|
152
|
-
chatButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
|
153
|
-
disabled: boolean;
|
154
|
-
};
|
155
|
-
/**
|
156
|
-
* Show or hide the people button in the call-with-chat composite control bar.
|
157
|
-
* @defaultValue true
|
158
|
-
*/
|
159
|
-
peopleButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ {
|
160
|
-
disabled: boolean;
|
161
|
-
};
|
162
|
-
/**
|
163
|
-
* Inject custom buttons in the call controls.
|
164
|
-
*
|
165
|
-
* @beta
|
166
|
-
*/
|
167
|
-
onFetchCustomButtonProps?: CustomCallWithChatControlButtonCallback[];
|
168
|
-
/**
|
169
|
-
* Show or hide the more button in the call-with-chat control bar.
|
170
|
-
*/
|
171
|
-
moreButton?: boolean;
|
172
|
-
/**
|
173
|
-
* Show or hide the hold button in the bottom sheet drawer
|
174
|
-
*/
|
175
|
-
holdButton?: boolean | {
|
176
|
-
disabled: boolean;
|
177
|
-
};
|
178
|
-
}
|
179
119
|
/**
|
180
120
|
* CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.
|
181
121
|
*
|
package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js
CHANGED
@@ -4,13 +4,13 @@ import React, { useCallback, useState, useMemo, useEffect, useRef } from 'react'
|
|
4
4
|
import { LayerHost, mergeStyles, Stack } from '@fluentui/react';
|
5
5
|
import { CallComposite } from '../CallComposite';
|
6
6
|
import { CallAdapterProvider } from '../CallComposite/adapter/CallAdapterProvider';
|
7
|
-
import {
|
7
|
+
import { CommonCallControlBar } from '../common/ControlBar/CommonCallControlBar';
|
8
8
|
import { callCompositeContainerStyles, compositeOuterContainerStyles, controlBarContainerStyles } from './styles/CallWithChatCompositeStyles';
|
9
9
|
import { CallWithChatBackedCallAdapter } from './adapter/CallWithChatBackedCallAdapter';
|
10
10
|
import { CallWithChatBackedChatAdapter } from './adapter/CallWithChatBackedChatAdapter';
|
11
11
|
import { BaseProvider } from '../common/BaseComposite';
|
12
12
|
import { ChatAdapterProvider } from '../ChatComposite/adapter/ChatAdapterProvider';
|
13
|
-
import { PreparedMoreDrawer } from '
|
13
|
+
import { PreparedMoreDrawer } from '../common/Drawer/PreparedMoreDrawer';
|
14
14
|
import { _useContainerHeight, _useContainerWidth } from "../../../../react-components/src";
|
15
15
|
import { useId } from '@fluentui/react-hooks';
|
16
16
|
import { CallWithChatPane } from './CallWithChatPane';
|
@@ -141,6 +141,8 @@ const CallWithChatScreen = (props) => {
|
|
141
141
|
}), [callWithChatStrings]);
|
142
142
|
/* @conditional-compile-remove(PSTN-calls) */
|
143
143
|
const alternateCallerId = callAdapter.getState().alternateCallerId;
|
144
|
+
/* @conditional-compile-remove(close-captions) */
|
145
|
+
const isTeamsCall = callAdapter.getState().isTeamsCall;
|
144
146
|
const callCompositeOptions = useMemo(() => ({
|
145
147
|
callControls: false,
|
146
148
|
/* @conditional-compile-remove(call-readiness) */
|
@@ -164,7 +166,7 @@ const CallWithChatScreen = (props) => {
|
|
164
166
|
return (React.createElement("div", { ref: containerRef, className: mergeStyles(containerDivStyles) },
|
165
167
|
React.createElement(Stack, { verticalFill: true, grow: true, styles: compositeOuterContainerStyles, id: compositeParentDivId },
|
166
168
|
React.createElement(Stack, { horizontal: true, grow: true },
|
167
|
-
React.createElement(Stack.Item, { grow: true, styles: callCompositeContainerStyles,
|
169
|
+
React.createElement(Stack.Item, { grow: true, styles: callCompositeContainerStyles(mobileView),
|
168
170
|
// Perf: Instead of removing the video gallery from DOM, we hide it to prevent re-renders.
|
169
171
|
style: callCompositeContainerCSS },
|
170
172
|
React.createElement(CallComposite, Object.assign({}, props, { formFactor: formFactor, options: callCompositeOptions, adapter: callAdapter, fluentTheme: fluentTheme }))),
|
@@ -173,11 +175,13 @@ const CallWithChatScreen = (props) => {
|
|
173
175
|
fileSharing: props.fileSharing, rtl: props.rtl, callControls: typeof props.callControls !== 'boolean' ? props.callControls : undefined }))),
|
174
176
|
showControlBar && !isMobileWithActivePane && (React.createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
|
175
177
|
React.createElement(Stack.Item, { styles: controlBarContainerStyles },
|
176
|
-
React.createElement(
|
178
|
+
React.createElement(CommonCallControlBar, { callAdapter: callAdapter, chatAdapter: chatProps.adapter, chatButtonChecked: activePane === 'chat', onChatButtonClicked: toggleChat, peopleButtonChecked: activePane === 'people', onPeopleButtonClicked: togglePeople, onMoreButtonClicked: onMoreButtonClicked, mobileView: mobileView, disableButtonsForLobbyPage: isInLobbyOrConnecting,
|
177
179
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
178
180
|
disableButtonsForHoldScreen: isInLocalHold, callControls: props.callControls, containerHeight: containerHeight, containerWidth: containerWidth,
|
179
181
|
/* @conditional-compile-remove(PSTN-calls) */
|
180
|
-
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined
|
182
|
+
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
|
183
|
+
/* @conditional-compile-remove(close-captions) */
|
184
|
+
isCaptionsSupported: isTeamsCall && hasJoinedCall, rtl: props.rtl })))),
|
181
185
|
showControlBar && showDrawer && (React.createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
|
182
186
|
React.createElement(CallAdapterProvider, { adapter: callAdapter },
|
183
187
|
React.createElement(Stack, { styles: drawerContainerStyles() },
|
@@ -185,7 +189,9 @@ const CallWithChatScreen = (props) => {
|
|
185
189
|
/* @conditional-compile-remove(PSTN-calls) */
|
186
190
|
onClickShowDialpad: alternateCallerId ? onClickShowDialpad : undefined,
|
187
191
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
188
|
-
disableButtonsForHoldScreen: isInLocalHold
|
192
|
+
disableButtonsForHoldScreen: isInLocalHold,
|
193
|
+
/* @conditional-compile-remove(close-captions) */
|
194
|
+
isCaptionsSupported: isTeamsCall && hasJoinedCall }))))),
|
189
195
|
/* @conditional-compile-remove(PSTN-calls) */
|
190
196
|
showControlBar && showDtmfDialpad && (React.createElement(ChatAdapterProvider, { adapter: chatProps.adapter },
|
191
197
|
React.createElement(CallAdapterProvider, { adapter: callAdapter },
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallWithChatComposite.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,E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,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,UAAU,KAAK,KAAK,CAAC;AAC3C,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CAAC,YAAmD,EAAW,EAAE;IACrG,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,YAAY,KAAK,KAAK,CAAC;AAC7C,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useCallback, useState, useMemo, useEffect, useRef } from 'react';\nimport { LayerHost, mergeStyles, PartialTheme, Stack, Theme } from '@fluentui/react';\nimport { CallComposite, CallCompositePage, CallControlDisplayType } from '../CallComposite';\nimport { CallAdapterProvider } from '../CallComposite/adapter/CallAdapterProvider';\nimport { CallWithChatControlBar } from './CallWithChatControlBar';\nimport { CallState } from '@azure/communication-calling';\nimport {\n callCompositeContainerStyles,\n compositeOuterContainerStyles,\n controlBarContainerStyles\n} from './styles/CallWithChatCompositeStyles';\nimport { CallWithChatAdapter } from './adapter/CallWithChatAdapter';\nimport { CallWithChatBackedCallAdapter } from './adapter/CallWithChatBackedCallAdapter';\nimport { CallWithChatBackedChatAdapter } from './adapter/CallWithChatBackedChatAdapter';\nimport { CallAdapter } from '../CallComposite';\nimport { ChatCompositeProps } from '../ChatComposite';\nimport { BaseProvider, BaseCompositeProps } from '../common/BaseComposite';\nimport { CallWithChatCompositeIcons } from '../common/icons';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { ChatAdapterProvider } from '../ChatComposite/adapter/ChatAdapterProvider';\nimport { CallWithChatAdapterState } from './state/CallWithChatAdapterState';\nimport { PreparedMoreDrawer } from './PreparedMoreDrawer';\nimport { ParticipantMenuItemsCallback, _useContainerHeight, _useContainerWidth } from '@internal/react-components';\nimport { useId } from '@fluentui/react-hooks';\nimport { CallWithChatPane, CallWithChatPaneOption } from './CallWithChatPane';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileSharingOptions } from '../ChatComposite';\nimport { containerDivStyles } from '../common/ContainerRectProps';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { CustomCallWithChatControlButtonCallback } from './CustomButton';\nimport { modalLayerHostStyle } from '../common/styles/ModalLocalAndRemotePIP.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';\nimport { CallCompositeOptions } from '../CallComposite/CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite/CallComposite';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\n\n/**\n * Props required for the {@link CallWithChatComposite}\n *\n * @public\n */\nexport interface CallWithChatCompositeProps extends BaseCompositeProps<CallWithChatCompositeIcons> {\n adapter: CallWithChatAdapter;\n /**\n * Fluent theme for the composite.\n *\n * Defaults to a light theme if undefined.\n */\n fluentTheme?: PartialTheme | Theme;\n /**\n * Optimizes the composite form factor for either desktop or mobile.\n * @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.\n * @defaultValue 'desktop'\n */\n formFactor?: 'desktop' | 'mobile';\n /**\n * URL that can be used to copy a call-with-chat invite to the Users clipboard.\n */\n joinInvitationURL?: string;\n /**\n * Flags to enable/disable or customize UI elements of the {@link CallWithChatComposite}\n */\n options?: CallWithChatCompositeOptions;\n}\n\n/**\n * Optional features of the {@link CallWithChatComposite}.\n *\n * @public\n */\nexport type CallWithChatCompositeOptions = {\n /**\n * Call control options to change what buttons show on the call-with-chat composite control bar.\n * If using the boolean values, true will cause default behavior across the whole control bar. False hides the whole control bar.\n */\n callControls?: boolean | CallWithChatControlOptions;\n /* @conditional-compile-remove(file-sharing) */\n /**\n * Properties for configuring the File Sharing feature.\n * If undefined, file sharing feature will be disabled.\n * @beta\n */\n fileSharing?: FileSharingOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Device permissions check options for your call.\n * Here you can choose what device permissions you prompt the user for,\n * as well as what device permissions must be accepted before starting a call.\n */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * unable to grant your site the required permissions for the call.\n *\n * @example\n * ```ts\n * onPermissionsTroubleshootingClick: () =>\n * window.open('https://contoso.com/permissions-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'further troubleshooting' link.\n */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Optional callback to supply users with further troubleshooting steps for network issues\n * experienced when connecting to a call.\n *\n * @example\n * ```ts\n * onNetworkingTroubleShootingClick?: () =>\n * window.open('https://contoso.com/network-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'network troubleshooting' link.\n */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Callback you may provide to supply users with a provided page to showcase supported browsers by ACS.\n *\n * @example\n * ```ts\n * onBrowserTroubleShootingClick?: () =>\n * window.open('https://contoso.com/browser-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a unsupported browser page.\n */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n};\n\n/**\n * {@link CallWithChatComposite} Call controls to show or hide buttons on the calling control bar.\n *\n * @public\n */\nexport interface CallWithChatControlOptions {\n /**\n * {@link CallControlDisplayType} to change how the call controls are displayed.\n * `'compact'` display type will decreases the size of buttons and hide the labels.\n *\n * @remarks\n * If the composite `formFactor` is set to `'mobile'`, the control bar will always use compact view.\n *\n * @defaultValue 'default'\n */\n displayType?: CallControlDisplayType;\n /**\n * Show or Hide Microphone button during a call.\n * @defaultValue true\n */\n microphoneButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n /**\n * Show or Hide Camera Button during a call\n * @defaultValue true\n */\n cameraButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n /**\n * Show, Hide or Disable the screen share button during a call.\n * @defaultValue true\n */\n screenShareButton?: boolean | { disabled: boolean };\n /**\n * Show or Hide EndCall button during a call.\n * @defaultValue true\n */\n endCallButton?: boolean;\n /**\n * Show or hide the chat button in the call-with-chat composite control bar.\n * @defaultValue true\n */\n chatButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n /**\n * Show or hide the people button in the call-with-chat composite control bar.\n * @defaultValue true\n */\n peopleButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n /* @conditional-compile-remove(control-bar-button-injection) */\n /**\n * Inject custom buttons in the call controls.\n *\n * @beta\n */\n onFetchCustomButtonProps?: CustomCallWithChatControlButtonCallback[];\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Show or hide the more button in the call-with-chat control bar.\n */\n moreButton?: boolean;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Show or hide the hold button in the bottom sheet drawer\n */\n holdButton?: boolean | { disabled: boolean };\n}\n\ntype CallWithChatScreenProps = {\n callWithChatAdapter: CallWithChatAdapter;\n fluentTheme?: PartialTheme | Theme;\n formFactor?: 'desktop' | 'mobile';\n joinInvitationURL?: string;\n callControls?: boolean | CallWithChatControlOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /* @conditional-compile-remove(file-sharing) */\n fileSharing?: FileSharingOptions;\n rtl?: boolean;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n};\n\nconst CallWithChatScreen = (props: CallWithChatScreenProps): JSX.Element => {\n const { callWithChatAdapter, fluentTheme, formFactor = 'desktop' } = props;\n const mobileView = formFactor === 'mobile';\n\n if (!callWithChatAdapter) {\n throw new Error('CallWithChatAdapter is undefined');\n }\n\n const callAdapter: CallAdapter = useMemo(\n () => new CallWithChatBackedCallAdapter(callWithChatAdapter),\n [callWithChatAdapter]\n );\n\n const [currentCallState, setCurrentCallState] = useState<CallState>();\n const [currentPage, setCurrentPage] = useState<CallCompositePage>();\n const [activePane, setActivePane] = useState<CallWithChatPaneOption>('none');\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n useEffect(() => {\n const updateCallWithChatPage = (newState: CallWithChatAdapterState): void => {\n setCurrentPage(newState.page);\n setCurrentCallState(newState.call?.state);\n };\n updateCallWithChatPage(callWithChatAdapter.getState());\n callWithChatAdapter.onStateChange(updateCallWithChatPage);\n return () => {\n callWithChatAdapter.offStateChange(updateCallWithChatPage);\n };\n }, [callWithChatAdapter]);\n\n const closePane = useCallback(() => {\n setActivePane('none');\n }, [setActivePane]);\n\n const chatProps: ChatCompositeProps = useMemo(() => {\n return {\n adapter: new CallWithChatBackedChatAdapter(callWithChatAdapter)\n };\n }, [callWithChatAdapter]);\n\n const modalLayerHostId = useId('modalLayerhost');\n\n const isInLobbyOrConnecting = currentPage === 'lobby';\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const isInLocalHold = currentPage === 'hold';\n const hasJoinedCall = !!(currentPage && hasJoinedCallFn(currentPage, currentCallState ?? 'None'));\n const showControlBar = isInLobbyOrConnecting || hasJoinedCall;\n const isMobileWithActivePane = mobileView && hasJoinedCall && activePane !== 'none';\n\n /** Constant setting of id for the parent stack of the composite */\n const compositeParentDivId = useId('callWithChatCompositeParentDiv-internal');\n\n const toggleChat = useCallback(() => {\n if (activePane === 'chat' || !hasJoinedCall) {\n setActivePane('none');\n } else {\n setActivePane('chat');\n // timeout is required to give the window time to render the sendbox so we have something to send focus to.\n // TODO: Selecting elements in the DOM via attributes is not stable. We should expose an API from ChatComposite to be able to focus on the sendbox.\n const chatFocusTimeout = setInterval(() => {\n const callWithChatCompositeRootDiv = document.querySelector(`[id=\"${compositeParentDivId}\"]`);\n const sendbox = callWithChatCompositeRootDiv?.querySelector(`[id=\"sendbox\"]`) as HTMLTextAreaElement;\n if (sendbox !== null) {\n sendbox.focus();\n clearInterval(chatFocusTimeout);\n }\n }, 3);\n setTimeout(() => {\n clearInterval(chatFocusTimeout);\n }, 300);\n }\n }, [activePane, setActivePane, compositeParentDivId, hasJoinedCall]);\n\n const togglePeople = useCallback(() => {\n if (activePane === 'people' || !hasJoinedCall) {\n setActivePane('none');\n } else {\n setActivePane('people');\n }\n }, [activePane, setActivePane, hasJoinedCall]);\n\n const selectChat = useCallback(() => {\n if (hasJoinedCall) {\n setActivePane('chat');\n }\n }, [setActivePane, hasJoinedCall]);\n\n const selectPeople = useCallback(() => {\n if (hasJoinedCall) {\n setActivePane('people');\n }\n }, [setActivePane, hasJoinedCall]);\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 togglePeople();\n }, [togglePeople]);\n\n // On mobile, when there is an active call and some side pane is active,\n // we hide the call composite via CSS to show only the pane.\n // We only set `display` to `none` instead of unmounting the call composite component tree\n // to avoid the performance cost of rerendering video streams when we later show the composite again.\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex' };\n }, [isMobileWithActivePane]);\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 /* @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 /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = callAdapter.getState().alternateCallerId;\n\n const callCompositeOptions: CallCompositeOptions = useMemo(\n () => ({\n callControls: false,\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks: props.deviceChecks,\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick: props.onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick: props.onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(unsupported-browser) */\n onEnvironmentInfoTroubleshootingClick: props.onEnvironmentInfoTroubleshootingClick\n }),\n [\n /* @conditional-compile-remove(call-readiness) */\n props.deviceChecks,\n /* @conditional-compile-remove(unsupported-browser) */\n props.onEnvironmentInfoTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */\n props.onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n props.onPermissionsTroubleshootingClick\n ]\n );\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)}>\n <Stack verticalFill grow styles={compositeOuterContainerStyles} id={compositeParentDivId}>\n <Stack horizontal grow>\n <Stack.Item\n grow\n styles={callCompositeContainerStyles}\n // Perf: Instead of removing the video gallery from DOM, we hide it to prevent re-renders.\n style={callCompositeContainerCSS}\n >\n <CallComposite\n {...props}\n formFactor={formFactor}\n options={callCompositeOptions}\n adapter={callAdapter}\n fluentTheme={fluentTheme}\n />\n </Stack.Item>\n\n {chatProps.adapter && callAdapter && hasJoinedCall && (\n <CallWithChatPane\n chatCompositeProps={chatProps}\n inviteLink={props.joinInvitationURL}\n onClose={closePane}\n chatAdapter={chatProps.adapter}\n callAdapter={callAdapter}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n onChatButtonClicked={showShowChatTabHeaderButton(props.callControls) ? selectChat : undefined}\n onPeopleButtonClicked={showShowPeopleTabHeaderButton(props.callControls) ? selectPeople : undefined}\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n activePane={activePane}\n /* @conditional-compile-remove(file-sharing) */\n fileSharing={props.fileSharing}\n rtl={props.rtl}\n callControls={typeof props.callControls !== 'boolean' ? props.callControls : undefined}\n />\n )}\n </Stack>\n {showControlBar && !isMobileWithActivePane && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <Stack.Item styles={controlBarContainerStyles}>\n <CallWithChatControlBar\n callAdapter={callAdapter}\n chatAdapter={chatProps.adapter}\n chatButtonChecked={activePane === 'chat'}\n onChatButtonClicked={toggleChat}\n peopleButtonChecked={activePane === 'people'}\n onPeopleButtonClicked={togglePeople}\n onMoreButtonClicked={onMoreButtonClicked}\n mobileView={mobileView}\n disableButtonsForLobbyPage={isInLobbyOrConnecting}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disableButtonsForHoldScreen={isInLocalHold}\n callControls={props.callControls}\n containerHeight={containerHeight}\n containerWidth={containerWidth}\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad={alternateCallerId ? onClickShowDialpad : undefined}\n />\n </Stack.Item>\n </ChatAdapterProvider>\n )}\n {showControlBar && showDrawer && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <CallAdapterProvider adapter={callAdapter}>\n <Stack styles={drawerContainerStyles()}>\n <PreparedMoreDrawer\n callControls={props.callControls}\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 />\n </Stack>\n </CallAdapterProvider>\n </ChatAdapterProvider>\n )}\n\n {\n /* @conditional-compile-remove(PSTN-calls) */\n showControlBar && showDtmfDialpad && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <CallAdapterProvider adapter={callAdapter}>\n <Stack styles={drawerContainerStyles()}>\n <SendDtmfDialpad\n isMobile={mobileView}\n strings={dialpadStrings}\n showDialpad={showDtmfDialpad}\n onDismissDialpad={onDismissDtmfDialpad}\n />\n </Stack>\n </CallAdapterProvider>\n </ChatAdapterProvider>\n )\n }\n {\n // This layer host is for ModalLocalAndRemotePIP in CallWithChatPane. This LayerHost cannot be inside the CallWithChatPane\n // because when the CallWithChatPane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging\n // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.\n mobileView && <LayerHost id={modalLayerHostId} className={mergeStyles(modalLayerHostStyle)} />\n }\n </Stack>\n </div>\n );\n};\n\n/**\n * CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.\n *\n * @public\n */\nexport const CallWithChatComposite = (props: CallWithChatCompositeProps): JSX.Element => {\n const { adapter, fluentTheme, rtl, formFactor, joinInvitationURL, options } = props;\n return (\n <BaseProvider fluentTheme={fluentTheme} rtl={rtl} locale={props.locale} icons={props.icons}>\n <CallWithChatScreen\n {...props}\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks={options?.deviceChecks}\n callWithChatAdapter={adapter}\n formFactor={formFactor}\n callControls={options?.callControls}\n joinInvitationURL={joinInvitationURL}\n fluentTheme={fluentTheme}\n /* @conditional-compile-remove(file-sharing) */\n fileSharing={options?.fileSharing}\n />\n </BaseProvider>\n );\n};\n\nconst hasJoinedCallFn = (page: CallCompositePage, callStatus: CallState): boolean => {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */\n return (\n (page === 'call' &&\n (callStatus === 'Connected' || callStatus === 'RemoteHold' || callStatus === 'Disconnecting')) ||\n (page === 'hold' && (callStatus === 'LocalHold' || callStatus === 'Disconnecting'))\n );\n return page === 'call' && (callStatus === 'Connected' || callStatus === 'Disconnecting');\n};\n\nconst showShowChatTabHeaderButton = (callControls?: boolean | CallWithChatControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.chatButton !== false;\n};\n\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallWithChatControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.peopleButton !== false;\n};\n\"../../../../react-components/src\""]}
|
1
|
+
{"version":3,"file":"CallWithChatComposite.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAgB,KAAK,EAAS,MAAM,iBAAiB,CAAC;AACrF,OAAO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Y,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,UAAU,KAAK,KAAK,CAAC;AAC3C,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CAAC,YAAmD,EAAW,EAAE;IACrG,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,YAAY,KAAK,KAAK,CAAC;AAC7C,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useCallback, useState, useMemo, useEffect, useRef } from 'react';\nimport { LayerHost, mergeStyles, PartialTheme, Stack, Theme } from '@fluentui/react';\nimport { CallComposite, CallCompositePage } from '../CallComposite';\nimport { CallAdapterProvider } from '../CallComposite/adapter/CallAdapterProvider';\nimport { CommonCallControlBar } from '../common/ControlBar/CommonCallControlBar';\nimport { CallState } from '@azure/communication-calling';\nimport {\n callCompositeContainerStyles,\n compositeOuterContainerStyles,\n controlBarContainerStyles\n} from './styles/CallWithChatCompositeStyles';\nimport { CallWithChatAdapter } from './adapter/CallWithChatAdapter';\nimport { CallWithChatBackedCallAdapter } from './adapter/CallWithChatBackedCallAdapter';\nimport { CallWithChatBackedChatAdapter } from './adapter/CallWithChatBackedChatAdapter';\nimport { CallAdapter } from '../CallComposite';\nimport { ChatCompositeProps } from '../ChatComposite';\nimport { BaseProvider, BaseCompositeProps } from '../common/BaseComposite';\nimport { CallWithChatCompositeIcons } from '../common/icons';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport { ChatAdapterProvider } from '../ChatComposite/adapter/ChatAdapterProvider';\nimport { CallWithChatAdapterState } from './state/CallWithChatAdapterState';\nimport { PreparedMoreDrawer } from '../common/Drawer/PreparedMoreDrawer';\nimport { ParticipantMenuItemsCallback, _useContainerHeight, _useContainerWidth } from '@internal/react-components';\nimport { useId } from '@fluentui/react-hooks';\nimport { CallWithChatPane, CallWithChatPaneOption } from './CallWithChatPane';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileSharingOptions } from '../ChatComposite';\nimport { containerDivStyles } from '../common/ContainerRectProps';\nimport { modalLayerHostStyle } from '../common/styles/ModalLocalAndRemotePIP.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';\nimport { CallCompositeOptions } from '../CallComposite/CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nimport { DeviceCheckOptions } from '../CallComposite/CallComposite';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\nimport { CommonCallControlOptions } from '../common/types/CommonCallControlOptions';\n\n/**\n * Props required for the {@link CallWithChatComposite}\n *\n * @public\n */\nexport interface CallWithChatCompositeProps extends BaseCompositeProps<CallWithChatCompositeIcons> {\n adapter: CallWithChatAdapter;\n /**\n * Fluent theme for the composite.\n *\n * Defaults to a light theme if undefined.\n */\n fluentTheme?: PartialTheme | Theme;\n /**\n * Optimizes the composite form factor for either desktop or mobile.\n * @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.\n * @defaultValue 'desktop'\n */\n formFactor?: 'desktop' | 'mobile';\n /**\n * URL that can be used to copy a call-with-chat invite to the Users clipboard.\n */\n joinInvitationURL?: string;\n /**\n * Flags to enable/disable or customize UI elements of the {@link CallWithChatComposite}\n */\n options?: CallWithChatCompositeOptions;\n}\n\n/**\n * Customization options for the control bar in calling with chat experience.\n *\n * @public\n */\nexport interface CallWithChatControlOptions extends CommonCallControlOptions {\n /**\n * Show or hide the chat button in the call-with-chat composite control bar.\n * @defaultValue true\n */\n chatButton?: boolean | /* @conditional-compile-remove(PSTN-calls) */ { disabled: boolean };\n}\n\n/**\n * Optional features of the {@link CallWithChatComposite}.\n *\n * @public\n */\nexport type CallWithChatCompositeOptions = {\n /**\n * Call control options to change what buttons show on the call-with-chat composite control bar.\n * If using the boolean values, true will cause default behavior across the whole control bar. False hides the whole control bar.\n */\n callControls?: boolean | CallWithChatControlOptions;\n /* @conditional-compile-remove(file-sharing) */\n /**\n * Properties for configuring the File Sharing feature.\n * If undefined, file sharing feature will be disabled.\n * @beta\n */\n fileSharing?: FileSharingOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Device permissions check options for your call.\n * Here you can choose what device permissions you prompt the user for,\n * as well as what device permissions must be accepted before starting a call.\n */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Callback you may provide to supply users with further steps to troubleshoot why they have been\n * unable to grant your site the required permissions for the call.\n *\n * @example\n * ```ts\n * onPermissionsTroubleshootingClick: () =>\n * window.open('https://contoso.com/permissions-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'further troubleshooting' link.\n */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n /**\n * Optional callback to supply users with further troubleshooting steps for network issues\n * experienced when connecting to a call.\n *\n * @example\n * ```ts\n * onNetworkingTroubleShootingClick?: () =>\n * window.open('https://contoso.com/network-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a 'network troubleshooting' link.\n */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n /**\n * Callback you may provide to supply users with a provided page to showcase supported browsers by ACS.\n *\n * @example\n * ```ts\n * onBrowserTroubleShootingClick?: () =>\n * window.open('https://contoso.com/browser-troubleshooting', '_blank');\n * ```\n *\n * @remarks\n * if this is not supplied, the composite will not show a unsupported browser page.\n */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n};\n\ntype CallWithChatScreenProps = {\n callWithChatAdapter: CallWithChatAdapter;\n fluentTheme?: PartialTheme | Theme;\n formFactor?: 'desktop' | 'mobile';\n joinInvitationURL?: string;\n callControls?: boolean | CallWithChatControlOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /* @conditional-compile-remove(file-sharing) */\n fileSharing?: FileSharingOptions;\n rtl?: boolean;\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks?: DeviceCheckOptions;\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick?: () => void;\n /* @conditional-compile-remove(unsupported-browser) */\n onEnvironmentInfoTroubleshootingClick?: () => void;\n};\n\nconst CallWithChatScreen = (props: CallWithChatScreenProps): JSX.Element => {\n const { callWithChatAdapter, fluentTheme, formFactor = 'desktop' } = props;\n const mobileView = formFactor === 'mobile';\n\n if (!callWithChatAdapter) {\n throw new Error('CallWithChatAdapter is undefined');\n }\n\n const callAdapter: CallAdapter = useMemo(\n () => new CallWithChatBackedCallAdapter(callWithChatAdapter),\n [callWithChatAdapter]\n );\n\n const [currentCallState, setCurrentCallState] = useState<CallState>();\n const [currentPage, setCurrentPage] = useState<CallCompositePage>();\n const [activePane, setActivePane] = useState<CallWithChatPaneOption>('none');\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n useEffect(() => {\n const updateCallWithChatPage = (newState: CallWithChatAdapterState): void => {\n setCurrentPage(newState.page);\n setCurrentCallState(newState.call?.state);\n };\n updateCallWithChatPage(callWithChatAdapter.getState());\n callWithChatAdapter.onStateChange(updateCallWithChatPage);\n return () => {\n callWithChatAdapter.offStateChange(updateCallWithChatPage);\n };\n }, [callWithChatAdapter]);\n\n const closePane = useCallback(() => {\n setActivePane('none');\n }, [setActivePane]);\n\n const chatProps: ChatCompositeProps = useMemo(() => {\n return {\n adapter: new CallWithChatBackedChatAdapter(callWithChatAdapter)\n };\n }, [callWithChatAdapter]);\n\n const modalLayerHostId = useId('modalLayerhost');\n\n const isInLobbyOrConnecting = currentPage === 'lobby';\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const isInLocalHold = currentPage === 'hold';\n const hasJoinedCall = !!(currentPage && hasJoinedCallFn(currentPage, currentCallState ?? 'None'));\n const showControlBar = isInLobbyOrConnecting || hasJoinedCall;\n const isMobileWithActivePane = mobileView && hasJoinedCall && activePane !== 'none';\n\n /** Constant setting of id for the parent stack of the composite */\n const compositeParentDivId = useId('callWithChatCompositeParentDiv-internal');\n\n const toggleChat = useCallback(() => {\n if (activePane === 'chat' || !hasJoinedCall) {\n setActivePane('none');\n } else {\n setActivePane('chat');\n // timeout is required to give the window time to render the sendbox so we have something to send focus to.\n // TODO: Selecting elements in the DOM via attributes is not stable. We should expose an API from ChatComposite to be able to focus on the sendbox.\n const chatFocusTimeout = setInterval(() => {\n const callWithChatCompositeRootDiv = document.querySelector(`[id=\"${compositeParentDivId}\"]`);\n const sendbox = callWithChatCompositeRootDiv?.querySelector(`[id=\"sendbox\"]`) as HTMLTextAreaElement;\n if (sendbox !== null) {\n sendbox.focus();\n clearInterval(chatFocusTimeout);\n }\n }, 3);\n setTimeout(() => {\n clearInterval(chatFocusTimeout);\n }, 300);\n }\n }, [activePane, setActivePane, compositeParentDivId, hasJoinedCall]);\n\n const togglePeople = useCallback(() => {\n if (activePane === 'people' || !hasJoinedCall) {\n setActivePane('none');\n } else {\n setActivePane('people');\n }\n }, [activePane, setActivePane, hasJoinedCall]);\n\n const selectChat = useCallback(() => {\n if (hasJoinedCall) {\n setActivePane('chat');\n }\n }, [setActivePane, hasJoinedCall]);\n\n const selectPeople = useCallback(() => {\n if (hasJoinedCall) {\n setActivePane('people');\n }\n }, [setActivePane, hasJoinedCall]);\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 togglePeople();\n }, [togglePeople]);\n\n // On mobile, when there is an active call and some side pane is active,\n // we hide the call composite via CSS to show only the pane.\n // We only set `display` to `none` instead of unmounting the call composite component tree\n // to avoid the performance cost of rerendering video streams when we later show the composite again.\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex' };\n }, [isMobileWithActivePane]);\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 /* @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 /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = callAdapter.getState().alternateCallerId;\n /* @conditional-compile-remove(close-captions) */\n const isTeamsCall = callAdapter.getState().isTeamsCall;\n\n const callCompositeOptions: CallCompositeOptions = useMemo(\n () => ({\n callControls: false,\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks: props.deviceChecks,\n /* @conditional-compile-remove(call-readiness) */\n onNetworkingTroubleShootingClick: props.onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n onPermissionsTroubleshootingClick: props.onPermissionsTroubleshootingClick,\n /* @conditional-compile-remove(unsupported-browser) */\n onEnvironmentInfoTroubleshootingClick: props.onEnvironmentInfoTroubleshootingClick\n }),\n [\n /* @conditional-compile-remove(call-readiness) */\n props.deviceChecks,\n /* @conditional-compile-remove(unsupported-browser) */\n props.onEnvironmentInfoTroubleshootingClick,\n /* @conditional-compile-remove(call-readiness) */\n props.onNetworkingTroubleShootingClick,\n /* @conditional-compile-remove(call-readiness) */\n props.onPermissionsTroubleshootingClick\n ]\n );\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)}>\n <Stack verticalFill grow styles={compositeOuterContainerStyles} id={compositeParentDivId}>\n <Stack horizontal grow>\n <Stack.Item\n grow\n styles={callCompositeContainerStyles(mobileView)}\n // Perf: Instead of removing the video gallery from DOM, we hide it to prevent re-renders.\n style={callCompositeContainerCSS}\n >\n <CallComposite\n {...props}\n formFactor={formFactor}\n options={callCompositeOptions}\n adapter={callAdapter}\n fluentTheme={fluentTheme}\n />\n </Stack.Item>\n {chatProps.adapter && callAdapter && hasJoinedCall && (\n <CallWithChatPane\n chatCompositeProps={chatProps}\n inviteLink={props.joinInvitationURL}\n onClose={closePane}\n chatAdapter={chatProps.adapter}\n callAdapter={callAdapter}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n onChatButtonClicked={showShowChatTabHeaderButton(props.callControls) ? selectChat : undefined}\n onPeopleButtonClicked={showShowPeopleTabHeaderButton(props.callControls) ? selectPeople : undefined}\n modalLayerHostId={modalLayerHostId}\n mobileView={mobileView}\n activePane={activePane}\n /* @conditional-compile-remove(file-sharing) */\n fileSharing={props.fileSharing}\n rtl={props.rtl}\n callControls={typeof props.callControls !== 'boolean' ? props.callControls : undefined}\n />\n )}\n </Stack>\n {showControlBar && !isMobileWithActivePane && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <Stack.Item styles={controlBarContainerStyles}>\n <CommonCallControlBar\n callAdapter={callAdapter}\n chatAdapter={chatProps.adapter}\n chatButtonChecked={activePane === 'chat'}\n onChatButtonClicked={toggleChat}\n peopleButtonChecked={activePane === 'people'}\n onPeopleButtonClicked={togglePeople}\n onMoreButtonClicked={onMoreButtonClicked}\n mobileView={mobileView}\n disableButtonsForLobbyPage={isInLobbyOrConnecting}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disableButtonsForHoldScreen={isInLocalHold}\n callControls={props.callControls}\n containerHeight={containerHeight}\n containerWidth={containerWidth}\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad={alternateCallerId ? onClickShowDialpad : undefined}\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported={isTeamsCall && hasJoinedCall}\n rtl={props.rtl}\n />\n </Stack.Item>\n </ChatAdapterProvider>\n )}\n {showControlBar && showDrawer && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <CallAdapterProvider adapter={callAdapter}>\n <Stack styles={drawerContainerStyles()}>\n <PreparedMoreDrawer\n callControls={props.callControls}\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 </CallAdapterProvider>\n </ChatAdapterProvider>\n )}\n\n {\n /* @conditional-compile-remove(PSTN-calls) */\n showControlBar && showDtmfDialpad && (\n <ChatAdapterProvider adapter={chatProps.adapter}>\n <CallAdapterProvider adapter={callAdapter}>\n <Stack styles={drawerContainerStyles()}>\n <SendDtmfDialpad\n isMobile={mobileView}\n strings={dialpadStrings}\n showDialpad={showDtmfDialpad}\n onDismissDialpad={onDismissDtmfDialpad}\n />\n </Stack>\n </CallAdapterProvider>\n </ChatAdapterProvider>\n )\n }\n {\n // This layer host is for ModalLocalAndRemotePIP in CallWithChatPane. This LayerHost cannot be inside the CallWithChatPane\n // because when the CallWithChatPane is hidden, ie. style property display is 'none', it takes up no space. This causes problems when dragging\n // the Modal because the draggable bounds thinks it has no space and will always return to its initial position after dragging.\n mobileView && <LayerHost id={modalLayerHostId} className={mergeStyles(modalLayerHostStyle)} />\n }\n </Stack>\n </div>\n );\n};\n\n/**\n * CallWithChatComposite brings together key components to provide a full call with chat experience out of the box.\n *\n * @public\n */\nexport const CallWithChatComposite = (props: CallWithChatCompositeProps): JSX.Element => {\n const { adapter, fluentTheme, rtl, formFactor, joinInvitationURL, options } = props;\n return (\n <BaseProvider fluentTheme={fluentTheme} rtl={rtl} locale={props.locale} icons={props.icons}>\n <CallWithChatScreen\n {...props}\n /* @conditional-compile-remove(call-readiness) */\n deviceChecks={options?.deviceChecks}\n callWithChatAdapter={adapter}\n formFactor={formFactor}\n callControls={options?.callControls}\n joinInvitationURL={joinInvitationURL}\n fluentTheme={fluentTheme}\n /* @conditional-compile-remove(file-sharing) */\n fileSharing={options?.fileSharing}\n />\n </BaseProvider>\n );\n};\n\nconst hasJoinedCallFn = (page: CallCompositePage, callStatus: CallState): boolean => {\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */\n return (\n (page === 'call' &&\n (callStatus === 'Connected' || callStatus === 'RemoteHold' || callStatus === 'Disconnecting')) ||\n (page === 'hold' && (callStatus === 'LocalHold' || callStatus === 'Disconnecting'))\n );\n return page === 'call' && (callStatus === 'Connected' || callStatus === 'Disconnecting');\n};\n\nconst showShowChatTabHeaderButton = (callControls?: boolean | CallWithChatControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.chatButton !== false;\n};\n\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallWithChatControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.peopleButton !== false;\n};\n\"../../../../react-components/src\""]}
|
@@ -52,6 +52,18 @@ export interface CallWithChatCompositeStrings {
|
|
52
52
|
* Only used with `mobileView` set to `true`.
|
53
53
|
*/
|
54
54
|
moreDrawerSpeakerMenuTitle: string;
|
55
|
+
/**
|
56
|
+
* Title for the captions sub-menu in more button drawer.
|
57
|
+
*
|
58
|
+
* Only used with `mobileView` set to `true`.
|
59
|
+
*/
|
60
|
+
moreDrawerCaptionsMenuTitle: string;
|
61
|
+
/**
|
62
|
+
* Title for the spoken language sub-menu in more button drawer.
|
63
|
+
*
|
64
|
+
* Only used with `mobileView` set to `true`.
|
65
|
+
*/
|
66
|
+
moreDrawerSpokenLanguageMenuTitle: string;
|
55
67
|
/**
|
56
68
|
* {@Link CallWithChatComposite} control bar More button label
|
57
69
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Strings used by the {@link CallWithChatComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface CallWithChatCompositeStrings {\n /**\n * {@link CallWithChatComposite} control bar People button label\n */\n peopleButtonLabel: string;\n /**\n * {@link CallWithChatComposite} control bar People button ToolTipContent\n */\n peopleButtonTooltipOpen: string;\n /**\n * {@link CallWithChatComposite} control bar People button ToolTipContent\n */\n peopleButtonTooltipClose: string;\n /**\n * {@link CallWithChatComposite} control bar Chat button label.\n */\n chatButtonLabel: string;\n /**\n * {@Link CallWithChatComposite} control bar Chat button ToolTipContent.\n */\n chatButtonTooltipOpen: string;\n /**\n * {@Link CallWithChatComposite} control bar Chat button ToolTipContent.\n */\n chatButtonTooltipClose: string;\n /**\n * {@link CallWithChatComposite} control bar Chat button enhanced tooltip string.\n */\n chatButtonTooltipClosedWithMessageCount: string;\n /**\n * Title for the audio device selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true` and when no speakers are available.\n */\n moreDrawerAudioDeviceMenuTitle?: string;\n /**\n * Title for the microphone selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true` and when speakers are available.\n */\n moreDrawerMicrophoneMenuTitle: string;\n /**\n * Title for the speaker selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true`.\n */\n moreDrawerSpeakerMenuTitle: string;\n /**\n * {@Link CallWithChatComposite} control bar More button label\n */\n moreDrawerButtonLabel: string;\n /**\n * {@Link CallWithChatComposite} control bar More button tooltip content\n */\n moreDrawerButtonTooltip: string;\n /**\n * Side pane People section Title.\n */\n peoplePaneTitle: string;\n /**\n * Side pane People section subheader.\n */\n peoplePaneSubTitle: string;\n /**\n * Side pane Chat screen title.\n */\n chatPaneTitle: string;\n /**\n * New Message label for chat button with notification icon component.\n */\n chatButtonNewMessageNotificationLabel: string;\n /**\n * Aria label for the picture in picture in picture tile that.\n * This feature currently only shows on mobileView when the chat or people pane is expanded.\n * @remarks\n * This component displays the local and most-dominant remote participant and when clicked\n * returns the user to the call screen.\n */\n pictureInPictureTileAriaLabel: string;\n /**\n * Label for menu item to remove participant\n */\n removeMenuLabel: string;\n /**\n * Label for button to copy invite link\n */\n copyInviteLinkButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to open dialpad\n */\n openDialpadButtonLabel: string;\n /**\n * Label for SidePaneHeader dismiss button\n */\n dismissSidePaneButtonLabel?: string;\n /**\n * Aria Description string for return to call button\n */\n returnToCallButtonAriaDescription?: string;\n /**\n * Aria label string for return to call back button\n */\n returnToCallButtonAriaLabel?: string;\n\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for add people dropdown\n */\n peoplePaneAddPeopleButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to start a call\n */\n dialpadStartCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Title for dialpad Modal\n */\n dialpadModalTitle: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal\n */\n dialpadModalAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal close button\n */\n dialpadCloseModalButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Placeholder text for dtmf dialpad\n */\n dtmfDialpadPlaceholderText: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for the button to open dtmf dialpad\n */\n openDtmfDialpadLabel: string;\n /**\n * aria label for when the invite link has been actioned\n */\n copyInviteLinkActionedAriaLabel: string;\n}\n"]}
|
1
|
+
{"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Strings used by the {@link CallWithChatComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface CallWithChatCompositeStrings {\n /**\n * {@link CallWithChatComposite} control bar People button label\n */\n peopleButtonLabel: string;\n /**\n * {@link CallWithChatComposite} control bar People button ToolTipContent\n */\n peopleButtonTooltipOpen: string;\n /**\n * {@link CallWithChatComposite} control bar People button ToolTipContent\n */\n peopleButtonTooltipClose: string;\n /**\n * {@link CallWithChatComposite} control bar Chat button label.\n */\n chatButtonLabel: string;\n /**\n * {@Link CallWithChatComposite} control bar Chat button ToolTipContent.\n */\n chatButtonTooltipOpen: string;\n /**\n * {@Link CallWithChatComposite} control bar Chat button ToolTipContent.\n */\n chatButtonTooltipClose: string;\n /**\n * {@link CallWithChatComposite} control bar Chat button enhanced tooltip string.\n */\n chatButtonTooltipClosedWithMessageCount: string;\n /**\n * Title for the audio device selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true` and when no speakers are available.\n */\n moreDrawerAudioDeviceMenuTitle?: string;\n /**\n * Title for the microphone selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true` and when speakers are available.\n */\n moreDrawerMicrophoneMenuTitle: string;\n /**\n * Title for the speaker selection sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true`.\n */\n moreDrawerSpeakerMenuTitle: string;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Title for the captions sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true`.\n */\n moreDrawerCaptionsMenuTitle: string;\n /* @conditional-compile-remove(close-captions) */\n /**\n * Title for the spoken language sub-menu in more button drawer.\n *\n * Only used with `mobileView` set to `true`.\n */\n moreDrawerSpokenLanguageMenuTitle: string;\n /**\n * {@Link CallWithChatComposite} control bar More button label\n */\n moreDrawerButtonLabel: string;\n /**\n * {@Link CallWithChatComposite} control bar More button tooltip content\n */\n moreDrawerButtonTooltip: string;\n /**\n * Side pane People section Title.\n */\n peoplePaneTitle: string;\n /**\n * Side pane People section subheader.\n */\n peoplePaneSubTitle: string;\n /**\n * Side pane Chat screen title.\n */\n chatPaneTitle: string;\n /**\n * New Message label for chat button with notification icon component.\n */\n chatButtonNewMessageNotificationLabel: string;\n /**\n * Aria label for the picture in picture in picture tile that.\n * This feature currently only shows on mobileView when the chat or people pane is expanded.\n * @remarks\n * This component displays the local and most-dominant remote participant and when clicked\n * returns the user to the call screen.\n */\n pictureInPictureTileAriaLabel: string;\n /**\n * Label for menu item to remove participant\n */\n removeMenuLabel: string;\n /**\n * Label for button to copy invite link\n */\n copyInviteLinkButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to open dialpad\n */\n openDialpadButtonLabel: string;\n /**\n * Label for SidePaneHeader dismiss button\n */\n dismissSidePaneButtonLabel?: string;\n /**\n * Aria Description string for return to call button\n */\n returnToCallButtonAriaDescription?: string;\n /**\n * Aria label string for return to call back button\n */\n returnToCallButtonAriaLabel?: string;\n\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for add people dropdown\n */\n peoplePaneAddPeopleButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to start a call\n */\n dialpadStartCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Title for dialpad Modal\n */\n dialpadModalTitle: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal\n */\n dialpadModalAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal close button\n */\n dialpadCloseModalButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Placeholder text for dtmf dialpad\n */\n dtmfDialpadPlaceholderText: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for the button to open dtmf dialpad\n */\n openDtmfDialpadLabel: string;\n /**\n * aria label for when the invite link has been actioned\n */\n copyInviteLinkActionedAriaLabel: string;\n}\n"]}
|
@@ -1,12 +1,15 @@
|
|
1
1
|
import { AudioDeviceInfo, Call, CallAgent, GroupCallLocator, PermissionConstraints, PropertyChangedEvent, TeamsMeetingLinkLocator, StartCallOptions, VideoDeviceInfo } from '@azure/communication-calling';
|
2
|
+
import { StartCaptionsOptions } from '@azure/communication-calling';
|
2
3
|
import { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';
|
3
4
|
import { CreateVideoStreamViewResult, VideoStreamOptions } from "../../../../../react-components/src";
|
5
|
+
import { AttachmentDownloadResult } from "../../../../../react-components/src";
|
4
6
|
import { FileMetadata } from "../../../../../react-components/src";
|
5
7
|
import { ParticipantsJoinedListener, ParticipantsLeftListener, IsMutedChangedListener, CallIdChangedListener, IsLocalScreenSharingActiveChangedListener, DisplayNameChangedListener, IsSpeakingChangedListener, CallAdapter, CallEndedListener } from '../../CallComposite';
|
6
8
|
import { MessageReceivedListener, MessageReadListener, ChatAdapter, ParticipantsRemovedListener, ParticipantsAddedListener } from '../../ChatComposite';
|
7
9
|
import { FileUploadManager } from '../../ChatComposite';
|
8
10
|
import { CallWithChatAdapter } from './CallWithChatAdapter';
|
9
11
|
import { CallWithChatAdapterState } from '../state/CallWithChatAdapterState';
|
12
|
+
import { AzureCommunicationChatAdapterOptions } from '../../ChatComposite/adapter/AzureCommunicationChatAdapter';
|
10
13
|
import { CommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';
|
11
14
|
import { CommunicationIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';
|
12
15
|
import { AdapterError } from '../../common/adapters';
|
@@ -16,6 +19,7 @@ import { StatefulCallClient } from "../../../../../calling-stateful-client/src";
|
|
16
19
|
import { StatefulChatClient } from "../../../../../chat-stateful-client/src";
|
17
20
|
import { ChatThreadClient } from '@azure/communication-chat';
|
18
21
|
import { AzureCommunicationCallAdapterOptions } from '../../CallComposite/adapter/AzureCommunicationCallAdapter';
|
22
|
+
import { IsCaptionsActiveChangedListener, CaptionsReceivedListener } from '../../CallComposite/adapter/CallAdapter';
|
19
23
|
/**
|
20
24
|
* CallWithChat adapter backed by Azure Communication Services.
|
21
25
|
* Created for easy use with the {@link CallWithChatComposite}.
|
@@ -99,12 +103,19 @@ export declare class AzureCommunicationCallWithChatAdapter implements CallWithCh
|
|
99
103
|
updateFileUploadProgress: (id: string, progress: number) => void;
|
100
104
|
updateFileUploadErrorMessage: (id: string, errorMessage: string) => void;
|
101
105
|
updateFileUploadMetadata: (id: string, metadata: FileMetadata) => void;
|
106
|
+
downloadAttachments(options: {
|
107
|
+
attachmentUrls: string[];
|
108
|
+
}): Promise<AttachmentDownloadResult[]>;
|
102
109
|
holdCall(): Promise<void>;
|
103
110
|
resumeCall(): Promise<void>;
|
104
111
|
addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;
|
105
112
|
addParticipant(participant: CommunicationUserIdentifier): Promise<void>;
|
106
113
|
sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;
|
107
114
|
allowUnsupportedBrowserVersion(): void;
|
115
|
+
startCaptions(options?: StartCaptionsOptions): Promise<void>;
|
116
|
+
stopCaptions(): Promise<void>;
|
117
|
+
setCaptionLanguage(language: string): Promise<void>;
|
118
|
+
setSpokenLanguage(language: string): Promise<void>;
|
108
119
|
on(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;
|
109
120
|
on(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;
|
110
121
|
on(event: 'callEnded', listener: CallEndedListener): void;
|
@@ -122,6 +133,8 @@ export declare class AzureCommunicationCallWithChatAdapter implements CallWithCh
|
|
122
133
|
on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;
|
123
134
|
on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;
|
124
135
|
on(event: 'chatError', listener: (e: AdapterError) => void): void;
|
136
|
+
on(event: 'captionsReceived', listener: CaptionsReceivedListener): void;
|
137
|
+
on(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;
|
125
138
|
off(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;
|
126
139
|
off(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;
|
127
140
|
off(event: 'callEnded', listener: CallEndedListener): void;
|
@@ -139,6 +152,8 @@ export declare class AzureCommunicationCallWithChatAdapter implements CallWithCh
|
|
139
152
|
off(event: 'chatParticipantsAdded', listener: ParticipantsAddedListener): void;
|
140
153
|
off(event: 'chatParticipantsRemoved', listener: ParticipantsRemovedListener): void;
|
141
154
|
off(event: 'chatError', listener: (e: AdapterError) => void): void;
|
155
|
+
off(event: 'captionsReceived', listener: CaptionsReceivedListener): void;
|
156
|
+
off(event: 'isCaptionsActiveChanged', listener: IsCaptionsActiveChangedListener): void;
|
142
157
|
}
|
143
158
|
/**
|
144
159
|
* Arguments for use in {@link createAzureCommunicationCallWithChatAdapter} to join a Call with an associated Chat thread.
|
@@ -198,6 +213,7 @@ export declare type AzureCommunicationCallWithChatAdapterFromClientArgs = {
|
|
198
213
|
callClient: StatefulCallClient;
|
199
214
|
chatClient: StatefulChatClient;
|
200
215
|
chatThreadClient: ChatThreadClient;
|
216
|
+
options?: AzureCommunicationChatAdapterOptions;
|
201
217
|
};
|
202
218
|
/**
|
203
219
|
* Create a {@link CallWithChatAdapter} using the provided {@link StatefulChatClient} and {@link StatefulCallClient}.
|
@@ -207,7 +223,7 @@ export declare type AzureCommunicationCallWithChatAdapterFromClientArgs = {
|
|
207
223
|
*
|
208
224
|
* @public
|
209
225
|
*/
|
210
|
-
export declare
|
226
|
+
export declare function createAzureCommunicationCallWithChatAdapterFromClients(callClient: StatefulCallClient, callAgent: CallAgent, callLocator: CallAdapterLocator | TeamsMeetingLinkLocator, chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient, options?: AzureCommunicationChatAdapterOptions): Promise<CallWithChatAdapter>;
|
211
227
|
/**
|
212
228
|
* Create a {@link CallWithChatAdapter} from the underlying adapters.
|
213
229
|
*
|
@@ -145,6 +145,8 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
145
145
|
this.updateFileUploadErrorMessage = this.updateFileUploadErrorMessage.bind(this);
|
146
146
|
/* @conditional-compile-remove(file-sharing) */
|
147
147
|
this.updateFileUploadMetadata = this.updateFileUploadMetadata.bind(this);
|
148
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
149
|
+
this.downloadAttachments = this.downloadAttachments.bind(this);
|
148
150
|
/* @conditional-compile-remove(PSTN-calls) */
|
149
151
|
this.holdCall.bind(this);
|
150
152
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -155,6 +157,12 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
155
157
|
this.sendDtmfTone.bind(this);
|
156
158
|
/* @conditional-compile-remove(unsupported-browser) */
|
157
159
|
this.allowUnsupportedBrowserVersion.bind(this);
|
160
|
+
/* @conditional-compile-remove(close-captions) */ {
|
161
|
+
this.startCaptions.bind(this);
|
162
|
+
this.stopCaptions.bind(this);
|
163
|
+
this.setSpokenLanguage.bind(this);
|
164
|
+
this.setCaptionLanguage.bind(this);
|
165
|
+
}
|
158
166
|
}
|
159
167
|
/** Join existing Call. */
|
160
168
|
joinCall(microphoneOn) {
|
@@ -338,6 +346,12 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
338
346
|
return yield this.chatAdapter.deleteMessage(messageId);
|
339
347
|
});
|
340
348
|
}
|
349
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
350
|
+
downloadAttachments(options) {
|
351
|
+
return __awaiter(this, void 0, void 0, function* () {
|
352
|
+
return yield this.chatAdapter.downloadAttachments(options);
|
353
|
+
});
|
354
|
+
}
|
341
355
|
/* @conditional-compile-remove(PSTN-calls) */
|
342
356
|
holdCall() {
|
343
357
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -371,6 +385,30 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
371
385
|
allowUnsupportedBrowserVersion() {
|
372
386
|
return this.callAdapter.allowUnsupportedBrowserVersion();
|
373
387
|
}
|
388
|
+
/* @conditional-compile-remove(close-captions) */
|
389
|
+
startCaptions(options) {
|
390
|
+
return __awaiter(this, void 0, void 0, function* () {
|
391
|
+
yield this.callAdapter.startCaptions(options);
|
392
|
+
});
|
393
|
+
}
|
394
|
+
/* @conditional-compile-remove(close-captions) */
|
395
|
+
stopCaptions() {
|
396
|
+
return __awaiter(this, void 0, void 0, function* () {
|
397
|
+
yield this.callAdapter.stopCaptions();
|
398
|
+
});
|
399
|
+
}
|
400
|
+
/* @conditional-compile-remove(close-captions) */
|
401
|
+
setCaptionLanguage(language) {
|
402
|
+
return __awaiter(this, void 0, void 0, function* () {
|
403
|
+
yield this.callAdapter.setCaptionLanguage(language);
|
404
|
+
});
|
405
|
+
}
|
406
|
+
/* @conditional-compile-remove(close-captions) */
|
407
|
+
setSpokenLanguage(language) {
|
408
|
+
return __awaiter(this, void 0, void 0, function* () {
|
409
|
+
yield this.callAdapter.setSpokenLanguage(language);
|
410
|
+
});
|
411
|
+
}
|
374
412
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
375
413
|
on(event, listener) {
|
376
414
|
switch (event) {
|
@@ -404,6 +442,14 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
404
442
|
case 'selectedSpeakerChanged':
|
405
443
|
this.callAdapter.on('selectedSpeakerChanged', listener);
|
406
444
|
break;
|
445
|
+
/* @conditional-compile-remove(close-captions) */
|
446
|
+
case 'captionsReceived':
|
447
|
+
this.callAdapter.on('captionsReceived', listener);
|
448
|
+
break;
|
449
|
+
/* @conditional-compile-remove(close-captions) */
|
450
|
+
case 'isCaptionsActiveChanged':
|
451
|
+
this.callAdapter.on('isCaptionsActiveChanged', listener);
|
452
|
+
break;
|
407
453
|
case 'messageReceived':
|
408
454
|
this.chatAdapter.on('messageReceived', listener);
|
409
455
|
break;
|
@@ -462,6 +508,14 @@ export class AzureCommunicationCallWithChatAdapter {
|
|
462
508
|
case 'selectedSpeakerChanged':
|
463
509
|
this.callAdapter.off('selectedSpeakerChanged', listener);
|
464
510
|
break;
|
511
|
+
/* @conditional-compile-remove(close-captions) */
|
512
|
+
case 'captionsReceived':
|
513
|
+
this.callAdapter.off('captionsReceived', listener);
|
514
|
+
break;
|
515
|
+
/* @conditional-compile-remove(close-captions) */
|
516
|
+
case 'isCaptionsActiveChanged':
|
517
|
+
this.callAdapter.off('isCaptionsActiveChanged', listener);
|
518
|
+
break;
|
465
519
|
case 'messageReceived':
|
466
520
|
this.chatAdapter.off('messageReceived', listener);
|
467
521
|
break;
|
@@ -638,12 +692,18 @@ beforeDispose) => {
|
|
638
692
|
*
|
639
693
|
* @public
|
640
694
|
*/
|
641
|
-
export
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
695
|
+
export function createAzureCommunicationCallWithChatAdapterFromClients(callClient, callAgent, callLocator, chatClient, chatThreadClient,
|
696
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
697
|
+
options) {
|
698
|
+
return __awaiter(this, void 0, void 0, function* () {
|
699
|
+
const createCallAdapterPromise = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, callLocator);
|
700
|
+
const createChatAdapterPromise = createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient,
|
701
|
+
/* @conditional-compile-remove(teams-inline-images) */
|
702
|
+
options);
|
703
|
+
const [callAdapter, chatAdapter] = yield Promise.all([createCallAdapterPromise, createChatAdapterPromise]);
|
704
|
+
return new AzureCommunicationCallWithChatAdapter(callAdapter, chatAdapter);
|
705
|
+
});
|
706
|
+
}
|
647
707
|
/**
|
648
708
|
* Create a {@link CallWithChatAdapter} from the underlying adapters.
|
649
709
|
*
|