@azure/communication-react 1.5.1-beta.1 → 1.5.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.beta.md +123 -1
- package/CHANGELOG.json +1068 -0
- package/README.md +1 -1
- package/dist/communication-react.d.ts +602 -170
- package/dist/dist-cjs/communication-react/index.js +6134 -3678
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +13 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +36 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +49 -0
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +53 -0
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -0
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +12 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +27 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +3 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +3 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js +2 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +68 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +19 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +95 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +57 -0
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +19 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +18 -0
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +38 -0
- package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +6 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +18 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.d.ts +4 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +5 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +3 -0
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +5 -0
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Logger.d.ts +16 -29
- package/dist/dist-esm/calling-stateful-client/src/Logger.js +16 -29
- package/dist/dist-esm/calling-stateful-client/src/Logger.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +137 -370
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.d.ts +17 -0
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js +198 -0
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +7 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +10 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index.js +2 -0
- package/dist/dist-esm/calling-stateful-client/src/index.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +59 -5
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.d.ts +4 -0
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.js +4 -0
- package/dist/dist-esm/chat-component-bindings/src/utils/constants.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +32 -26
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +15 -3
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +6 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +9 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +12 -0
- package/dist/dist-esm/react-components/src/components/CameraButton.js +24 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Caption.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/Caption.js +33 -0
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +31 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +49 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +37 -0
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +88 -0
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +22 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +19 -16
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +4 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +11 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +38 -20
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +14 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +96 -11
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.js +79 -55
- package/dist/dist-esm/react-components/src/components/DevicesButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +1 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +13 -0
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +5 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/GridLayout.js +1 -1
- package/dist/dist-esm/react-components/src/components/GridLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js +29 -24
- package/dist/dist-esm/react-components/src/components/HorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +38 -6
- package/dist/dist-esm/react-components/src/components/MessageThread.js +110 -51
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +12 -0
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js +29 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +1 -1
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.d.ts +4 -2
- package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js +6 -42
- package/dist/dist-esm/react-components/src/components/ResponsiveHorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.d.ts +35 -0
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js +32 -0
- package/dist/dist-esm/react-components/src/components/ResponsiveVerticalGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js +10 -2
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.js +5 -2
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +70 -0
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +52 -0
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VerticalGallery.d.ts +67 -0
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js +113 -0
- package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.js +65 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +75 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +44 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +88 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +80 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +55 -19
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.d.ts +10 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js +12 -10
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +81 -24
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +11 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.d.ts +21 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +63 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js +8 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +32 -7
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +28 -12
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js +2 -2
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/ScrollableHorizontalGallery.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.d.ts +4 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js +8 -7
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveHorizontalGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.d.ts +64 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js +79 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/VideoGalleryResponsiveVerticalGallery.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.d.ts +25 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.js +94 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/OverflowGalleryUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +4 -4
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +58 -49
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +25 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +32 -4
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +9 -12
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +12 -1
- package/dist/dist-esm/react-components/src/components/index.js +11 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +33 -0
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +60 -0
- package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.d.ts +34 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +86 -0
- package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +14 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js +16 -0
- package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js +1 -0
- package/dist/dist-esm/react-components/src/components/styles/HorizontalGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +7 -2
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +58 -2
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.d.ts +32 -0
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js +66 -0
- package/dist/dist-esm/react-components/src/components/styles/VerticalGallery.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js +1 -0
- package/dist/dist-esm/react-components/src/components/styles/VideoTile.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +6 -4
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.d.ts +11 -0
- package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.js +22 -0
- package/dist/dist-esm/react-components/src/components/utils/overFlowGalleriesUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils/responsive.d.ts +6 -0
- package/dist/dist-esm/react-components/src/components/utils/responsive.js +7 -0
- package/dist/dist-esm/react-components/src/components/utils/responsive.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.d.ts +9 -0
- package/dist/dist-esm/react-components/src/components/utils.js +24 -0
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js +6 -14
- package/dist/dist-esm/react-components/src/gallery/dominantSpeaker.js.map +1 -1
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +10 -4
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +7 -2
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +2 -0
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +5 -0
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +18 -4
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +17 -4
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +17 -4
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +1 -1
- package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +11 -0
- package/dist/dist-esm/react-components/src/theming/icons.js +33 -7
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +48 -0
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js +4 -0
- package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +21 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/types/index.js +1 -0
- package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +2 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +65 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +69 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +53 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +103 -21
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +21 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +9 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +4 -32
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +16 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +3 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +41 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +5 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +20 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallControls.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.d.ts +20 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js +21 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LocalPreview.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +5 -87
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +15 -75
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +12 -6
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +17 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +66 -6
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +30 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +24 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/parseTeamsUrl.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js +5 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/styles/CallWithChatCompositeStyles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +27 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +19 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +68 -6
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +60 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +107 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js +38 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +30 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +286 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +83 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +81 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/ControlBar}/DesktopMoreButton.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +193 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/PeopleButton.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/PeopleButton.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/Drawer}/MoreDrawer.d.ts +15 -2
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite/components → common/Drawer}/MoreDrawer.js +113 -9
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js +24 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/Drawer}/PreparedMoreDrawer.d.ts +3 -2
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js +26 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.d.ts +20 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js +55 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js +25 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/constants.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/common/constants.js +11 -0
- package/dist/dist-esm/react-composites/src/composites/common/constants.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +13 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +8 -14
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.js +9 -0
- package/dist/dist-esm/react-composites/src/composites/common/styles/Composite.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +165 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +66 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +66 -1
- package/package.json +15 -16
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js +0 -19
- package/dist/dist-esm/react-components/src/components/VideoGallery/VideoGalleryResponsiveHorizontalGallery.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +0 -27
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +0 -190
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.d.ts +0 -67
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js +0 -75
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js +0 -22
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +0 -65
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +0 -1
package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js
ADDED
@@ -0,0 +1,286 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT license.
|
3
|
+
import React, { useMemo, useRef, useEffect, useState, useCallback } from 'react';
|
4
|
+
import { CallAdapterProvider } from '../../CallComposite/adapter/CallAdapterProvider';
|
5
|
+
import { PeopleButton } from './PeopleButton';
|
6
|
+
import { concatStyleSets, mergeStyles, mergeStyleSets, Stack, useTheme } from '@fluentui/react';
|
7
|
+
import { controlBarContainerStyles } from '../../CallComposite/styles/CallControls.styles';
|
8
|
+
import { callControlsContainerStyles } from '../../CallComposite/styles/CallPage.styles';
|
9
|
+
import { useCallWithChatCompositeStrings } from '../../CallWithChatComposite/hooks/useCallWithChatCompositeStrings';
|
10
|
+
import { ChatButtonWithUnreadMessagesBadge } from '../../CallWithChatComposite/ChatButtonWithUnreadMessagesBadge';
|
11
|
+
import { ControlBar } from "../../../../../react-components/src";
|
12
|
+
import { Microphone } from '../../CallComposite/components/buttons/Microphone';
|
13
|
+
import { Camera } from '../../CallComposite/components/buttons/Camera';
|
14
|
+
import { ScreenShare } from '../../CallComposite/components/buttons/ScreenShare';
|
15
|
+
import { EndCall } from '../../CallComposite/components/buttons/EndCall';
|
16
|
+
import { MoreButton } from '../MoreButton';
|
17
|
+
/* @conditional-compile-remove(control-bar-button-injection) */
|
18
|
+
import { CUSTOM_BUTTON_OPTIONS, generateCustomCallControlBarButton, onFetchCustomButtonPropsTrampoline } from './CustomButton';
|
19
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
20
|
+
import { DesktopMoreButton } from './DesktopMoreButton';
|
21
|
+
import { isDisabled } from '../../CallComposite/utils';
|
22
|
+
import { HiddenFocusStartPoint } from '../HiddenFocusStartPoint';
|
23
|
+
/* @conditional-compile-remove(close-captions) */
|
24
|
+
import { CaptionsSettingsModal } from '../CaptionsSettingsModal';
|
25
|
+
const inferCommonCallControlOptions = (mobileView, commonCallControlOptions) => {
|
26
|
+
if (commonCallControlOptions === false) {
|
27
|
+
return false;
|
28
|
+
}
|
29
|
+
const options = commonCallControlOptions === true || commonCallControlOptions === undefined ? {} : commonCallControlOptions;
|
30
|
+
if (mobileView) {
|
31
|
+
// Set to compressed mode when composite is optimized for mobile
|
32
|
+
options.displayType = 'compact';
|
33
|
+
// Do not show screen share button when composite is optimized for mobile unless the developer
|
34
|
+
// has explicitly opted in.
|
35
|
+
if (options.screenShareButton !== true) {
|
36
|
+
options.screenShareButton = false;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
return options;
|
40
|
+
};
|
41
|
+
/**
|
42
|
+
* @private
|
43
|
+
*/
|
44
|
+
export const CommonCallControlBar = (props) => {
|
45
|
+
var _a, _b, _c;
|
46
|
+
const theme = useTheme();
|
47
|
+
const controlBarContainerRef = useRef(null);
|
48
|
+
const sidepaneControlsRef = useRef(null);
|
49
|
+
const controlBarSizeRef = useRef(null);
|
50
|
+
const [controlBarButtonsWidth, setControlBarButtonsWidth] = useState(0);
|
51
|
+
const [panelsButtonsWidth, setPanelsButtonsWidth] = useState(0);
|
52
|
+
const [controlBarContainerWidth, setControlBarContainerWidth] = useState(0);
|
53
|
+
const [totalButtonsWidth, setTotalButtonsWidth] = useState(0);
|
54
|
+
const [isOutOfSpace, setIsOutOfSpace] = useState(false);
|
55
|
+
const callWithChatStrings = useCallWithChatCompositeStrings();
|
56
|
+
const options = inferCommonCallControlOptions(props.mobileView, props.callControls);
|
57
|
+
/* @conditional-compile-remove(close-captions) */
|
58
|
+
const [showCaptionsSettingsModal, setShowCaptionsSettingsModal] = useState(false);
|
59
|
+
const handleResize = useCallback(() => {
|
60
|
+
setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);
|
61
|
+
setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);
|
62
|
+
setControlBarContainerWidth(controlBarSizeRef.current ? controlBarSizeRef.current.offsetWidth : 0);
|
63
|
+
}, []);
|
64
|
+
// on load set inital width
|
65
|
+
useEffect(() => {
|
66
|
+
setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);
|
67
|
+
setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);
|
68
|
+
setControlBarContainerWidth(controlBarSizeRef.current ? controlBarSizeRef.current.offsetWidth : 0);
|
69
|
+
}, []);
|
70
|
+
// get the current width of control bar buttons and panel control buttons when browser size change
|
71
|
+
useEffect(() => {
|
72
|
+
window.addEventListener('resize', handleResize);
|
73
|
+
return () => window.removeEventListener('resize', handleResize);
|
74
|
+
}, [handleResize]);
|
75
|
+
/* when size change, reset total buttons width and compare with the control bar container width
|
76
|
+
if the total width of those buttons exceed container width, do not center the control bar buttons based on parent container width
|
77
|
+
Instead let them take up the remaining white space on the left */
|
78
|
+
useEffect(() => {
|
79
|
+
// white space on the left when control bar buttons are centered based on container width + control bar buttons width + panel control buttons width
|
80
|
+
setTotalButtonsWidth((controlBarContainerWidth - controlBarButtonsWidth) / 2 + controlBarButtonsWidth + panelsButtonsWidth);
|
81
|
+
}, [controlBarButtonsWidth, panelsButtonsWidth, controlBarContainerWidth]);
|
82
|
+
useEffect(() => {
|
83
|
+
setIsOutOfSpace(totalButtonsWidth > controlBarContainerWidth);
|
84
|
+
}, [totalButtonsWidth, controlBarContainerWidth]);
|
85
|
+
/* @conditional-compile-remove(close-captions) */
|
86
|
+
const openCaptionsSettingsModal = useCallback(() => {
|
87
|
+
setShowCaptionsSettingsModal(true);
|
88
|
+
}, []);
|
89
|
+
/* @conditional-compile-remove(close-captions) */
|
90
|
+
const onDismissCaptionsSettings = useCallback(() => {
|
91
|
+
setShowCaptionsSettingsModal(false);
|
92
|
+
}, []);
|
93
|
+
const chatButtonStrings = useMemo(() => ({
|
94
|
+
label: callWithChatStrings.chatButtonLabel,
|
95
|
+
tooltipOffContent: callWithChatStrings.chatButtonTooltipOpen,
|
96
|
+
tooltipOnContent: callWithChatStrings.chatButtonTooltipClose
|
97
|
+
}), [callWithChatStrings]);
|
98
|
+
const peopleButtonStrings = useMemo(() => ({
|
99
|
+
label: callWithChatStrings.peopleButtonLabel,
|
100
|
+
tooltipOffContent: callWithChatStrings.peopleButtonTooltipOpen,
|
101
|
+
tooltipOnContent: callWithChatStrings.peopleButtonTooltipClose
|
102
|
+
}), [callWithChatStrings]);
|
103
|
+
const moreButtonStrings = useMemo(() => ({
|
104
|
+
label: callWithChatStrings.moreDrawerButtonLabel,
|
105
|
+
tooltipContent: callWithChatStrings.moreDrawerButtonTooltip
|
106
|
+
}), [callWithChatStrings]);
|
107
|
+
const centerContainerStyles = useMemo(() => {
|
108
|
+
const styles = !props.mobileView ? desktopControlBarStyles : {};
|
109
|
+
return mergeStyleSets(styles, {
|
110
|
+
root: {
|
111
|
+
// Enforce a background color on control bar to ensure it matches the composite background color.
|
112
|
+
background: theme.semanticColors.bodyBackground
|
113
|
+
}
|
114
|
+
});
|
115
|
+
}, [props.mobileView, theme.semanticColors.bodyBackground]);
|
116
|
+
const screenShareButtonStyles = useMemo(() => (!props.mobileView ? getDesktopScreenShareButtonStyles(theme) : undefined), [props.mobileView, theme]);
|
117
|
+
const commonButtonStyles = useMemo(() => (!props.mobileView ? getDesktopCommonButtonStyles(theme) : undefined), [props.mobileView, theme]);
|
118
|
+
const endCallButtonStyles = useMemo(() => (!props.mobileView ? getDesktopEndCallButtonStyles(theme) : undefined), [props.mobileView, theme]);
|
119
|
+
const controlBarWrapperDesktopStyles = useMemo(
|
120
|
+
// only center control bar buttons based on parent container if there are enough space on the screen and not mobile
|
121
|
+
() => (!props.mobileView && !isOutOfSpace ? (props.rtl ? wrapperDesktopRtlStyles : wrapperDesktopStyles) : {}), [props.mobileView, props.rtl, isOutOfSpace]);
|
122
|
+
// only center control bar buttons based on parent container if there are enough space on the screen and not mobile
|
123
|
+
const controlBarDesktopContainerStyles = useMemo(() => (!props.mobileView && !isOutOfSpace ? { position: 'relative', minHeight: '4.5rem', width: '100%' } : {}), [props.mobileView, isOutOfSpace]);
|
124
|
+
/* @conditional-compile-remove(control-bar-button-injection) */
|
125
|
+
const customButtons = useMemo(() => generateCustomCallControlBarButton(onFetchCustomButtonPropsTrampoline(options !== false ? options : undefined), options !== false ? options === null || options === void 0 ? void 0 : options.displayType : undefined), [options]);
|
126
|
+
// when options is false then we want to hide the whole control bar.
|
127
|
+
if (options === false) {
|
128
|
+
return React.createElement(React.Fragment, null);
|
129
|
+
}
|
130
|
+
const chatButton = props.chatAdapter ? (React.createElement(ChatButtonWithUnreadMessagesBadge, { chatAdapter: props.chatAdapter, checked: props.chatButtonChecked, showLabel: options.displayType !== 'compact', isChatPaneVisible: (_a = props.chatButtonChecked) !== null && _a !== void 0 ? _a : false, onClick: props.onChatButtonClicked, disabled: props.disableButtonsForLobbyPage || isDisabled(options.chatButton), strings: chatButtonStrings, styles: commonButtonStyles, newMessageLabel: callWithChatStrings.chatButtonNewMessageNotificationLabel })) : (React.createElement(React.Fragment, null));
|
131
|
+
return (React.createElement("div", { ref: controlBarSizeRef },
|
132
|
+
React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
133
|
+
/* @conditional-compile-remove(close-captions) */ showCaptionsSettingsModal && (React.createElement(CaptionsSettingsModal, { showCaptionsSettingsModal: showCaptionsSettingsModal, onDismissCaptionsSettings: onDismissCaptionsSettings }))),
|
134
|
+
React.createElement(Stack, { horizontal: true, reversed: !props.mobileView && !isOutOfSpace, horizontalAlign: "space-between", className: mergeStyles(callControlsContainerStyles, controlBarContainerStyles, controlBarDesktopContainerStyles) },
|
135
|
+
React.createElement(Stack.Item, { grow: true, className: mergeStyles(controlBarWrapperDesktopStyles) },
|
136
|
+
React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
137
|
+
React.createElement(Stack, { horizontalAlign: "center" },
|
138
|
+
React.createElement(HiddenFocusStartPoint, null),
|
139
|
+
React.createElement(Stack.Item, null,
|
140
|
+
React.createElement("div", { ref: controlBarContainerRef },
|
141
|
+
React.createElement(ControlBar, { layout: "horizontal", styles: centerContainerStyles },
|
142
|
+
isEnabled(options.microphoneButton) && (React.createElement(Microphone, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView,
|
143
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
144
|
+
disabled: props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton) })),
|
145
|
+
isEnabled(options.cameraButton) && (React.createElement(Camera, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView,
|
146
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
147
|
+
disabled: props.disableButtonsForHoldScreen || isDisabled(options.cameraButton) })),
|
148
|
+
props.mobileView && isEnabled(options === null || options === void 0 ? void 0 : options.chatButton) && chatButton,
|
149
|
+
isEnabled(options.screenShareButton) && (React.createElement(ScreenShare, { option: options.screenShareButton, displayType: options.displayType, styles: screenShareButtonStyles,
|
150
|
+
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
151
|
+
disabled: props.disableButtonsForHoldScreen || isDisabled(options.screenShareButton) })),
|
152
|
+
/* @conditional-compile-remove(control-bar-button-injection) */
|
153
|
+
(_b = customButtons['primary']) === null || _b === void 0 ? void 0 :
|
154
|
+
_b.slice(0, props.mobileView
|
155
|
+
? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS
|
156
|
+
: CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
157
|
+
return (React.createElement(CustomButton, { key: `primary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
158
|
+
}),
|
159
|
+
props.mobileView && (React.createElement(MoreButton, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage })),
|
160
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled(options === null || options === void 0 ? void 0 : options.moreButton) &&
|
161
|
+
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled(options === null || options === void 0 ? void 0 : options.holdButton) &&
|
162
|
+
!props.mobileView && (React.createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad,
|
163
|
+
/* @conditional-compile-remove(control-bar-button-injection) */
|
164
|
+
callControls: props.callControls,
|
165
|
+
/* @conditional-compile-remove(close-captions) */
|
166
|
+
isCaptionsSupported: props.isCaptionsSupported,
|
167
|
+
/* @conditional-compile-remove(close-captions) */
|
168
|
+
onCaptionsSettingsClick: openCaptionsSettingsModal })),
|
169
|
+
React.createElement(EndCall, { displayType: "compact", styles: endCallButtonStyles }))))))),
|
170
|
+
!props.mobileView && (React.createElement(Stack.Item, null,
|
171
|
+
React.createElement("div", { ref: sidepaneControlsRef },
|
172
|
+
React.createElement(Stack, { horizontal: true, className: !props.mobileView ? mergeStyles(desktopButtonContainerStyle) : undefined },
|
173
|
+
/* @conditional-compile-remove(control-bar-button-injection) */
|
174
|
+
(_c = customButtons['secondary']) === null || _c === void 0 ? void 0 :
|
175
|
+
_c.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
176
|
+
return (React.createElement(CustomButton, { key: `secondary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
177
|
+
}),
|
178
|
+
isEnabled(options === null || options === void 0 ? void 0 : options.peopleButton) && (React.createElement(PeopleButton, { checked: props.peopleButtonChecked, ariaLabel: peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.label, showLabel: options.displayType !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "common-call-composite-people-button", disabled: props.disableButtonsForLobbyPage || isDisabled(options.peopleButton), strings: peopleButtonStrings, styles: commonButtonStyles })),
|
179
|
+
isEnabled(options === null || options === void 0 ? void 0 : options.chatButton) && chatButton)))))));
|
180
|
+
};
|
181
|
+
const desktopButtonContainerStyle = {
|
182
|
+
padding: '0.75rem',
|
183
|
+
columnGap: '0.5rem'
|
184
|
+
};
|
185
|
+
const desktopControlBarStyles = {
|
186
|
+
root: desktopButtonContainerStyle
|
187
|
+
};
|
188
|
+
{
|
189
|
+
/*
|
190
|
+
Styling here to ensure the control bar buttons stay in the center of the parent component (control Container) regardless of its siblings
|
191
|
+
Need to add 'reversed' to parent container because the styling here reverse the position of the two stack items
|
192
|
+
*/
|
193
|
+
}
|
194
|
+
const wrapperDesktopStyles = {
|
195
|
+
position: 'absolute',
|
196
|
+
left: '50%',
|
197
|
+
transform: 'translate(-50%, 0)'
|
198
|
+
};
|
199
|
+
const wrapperDesktopRtlStyles = {
|
200
|
+
position: 'absolute',
|
201
|
+
right: '50%',
|
202
|
+
transform: 'translate(-50%, 0)'
|
203
|
+
};
|
204
|
+
const getDesktopCommonButtonStyles = (theme) => ({
|
205
|
+
root: {
|
206
|
+
border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,
|
207
|
+
borderRadius: theme.effects.roundedCorner4,
|
208
|
+
minHeight: '2.5rem',
|
209
|
+
maxWidth: '12rem' // allot extra space than the regular ControlBarButton. This is to give extra room to have the icon beside the text.
|
210
|
+
},
|
211
|
+
flexContainer: {
|
212
|
+
display: 'flex',
|
213
|
+
flexFlow: 'row nowrap'
|
214
|
+
},
|
215
|
+
textContainer: {
|
216
|
+
// Override the default so that label doesn't introduce a new block.
|
217
|
+
display: 'inline',
|
218
|
+
// Ensure width is set to permit child to show ellipsis when there is a label that is too long
|
219
|
+
maxWidth: '100%'
|
220
|
+
},
|
221
|
+
label: {
|
222
|
+
fontSize: theme.fonts.medium.fontSize,
|
223
|
+
// Ensure there is enough space between the icon and text to allow for the unread messages badge in the chat button
|
224
|
+
marginLeft: '0.625rem',
|
225
|
+
// Ensure letters that go above and below the standard text line like 'g', 'y', 'j' are not clipped
|
226
|
+
lineHeight: '1.5rem',
|
227
|
+
// Do not allow very long button texts to ruin the control bar experience, instead ensure long text is truncated and shows ellipsis
|
228
|
+
display: 'block',
|
229
|
+
textOverflow: 'ellipsis',
|
230
|
+
whiteSpace: 'nowrap',
|
231
|
+
overflow: 'hidden'
|
232
|
+
},
|
233
|
+
splitButtonMenuButton: {
|
234
|
+
border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,
|
235
|
+
borderTopRightRadius: theme.effects.roundedCorner4,
|
236
|
+
borderBottomRightRadius: theme.effects.roundedCorner4,
|
237
|
+
borderTopLeftRadius: '0',
|
238
|
+
borderBottomLeftRadius: '0'
|
239
|
+
},
|
240
|
+
splitButtonMenuButtonChecked: {
|
241
|
+
// Default colors the menu half similarly for :hover and when button is checked.
|
242
|
+
// To align with how the left-half is styled, override the checked style.
|
243
|
+
background: 'none'
|
244
|
+
}
|
245
|
+
});
|
246
|
+
const getDesktopScreenShareButtonStyles = (theme) => {
|
247
|
+
const overrideStyles = {
|
248
|
+
border: 'none',
|
249
|
+
background: theme.palette.themePrimary,
|
250
|
+
color: theme.palette.white,
|
251
|
+
'* > svg': { fill: theme.palette.white },
|
252
|
+
'@media (forced-colors: active)': {
|
253
|
+
border: '1px solid',
|
254
|
+
borderColor: theme.palette.black
|
255
|
+
}
|
256
|
+
};
|
257
|
+
const overrides = {
|
258
|
+
rootChecked: overrideStyles,
|
259
|
+
rootCheckedHovered: overrideStyles
|
260
|
+
};
|
261
|
+
return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);
|
262
|
+
};
|
263
|
+
const getDesktopEndCallButtonStyles = (theme) => {
|
264
|
+
const overrides = {
|
265
|
+
root: {
|
266
|
+
// Suppress border around the dark-red button.
|
267
|
+
border: 'none'
|
268
|
+
},
|
269
|
+
rootFocused: {
|
270
|
+
'@media (forced-colors: active)': {
|
271
|
+
background: 'highlight',
|
272
|
+
border: '1px solid'
|
273
|
+
}
|
274
|
+
},
|
275
|
+
icon: {
|
276
|
+
'@media (forced-colors: active)': {
|
277
|
+
':focused': {
|
278
|
+
color: theme.palette.white
|
279
|
+
}
|
280
|
+
}
|
281
|
+
}
|
282
|
+
};
|
283
|
+
return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);
|
284
|
+
};
|
285
|
+
const isEnabled = (option) => option !== false;
|
286
|
+
//# sourceMappingURL=CommonCallControlBar.js.map
|
package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CommonCallControlBar.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/ControlBar/CommonCallControlBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAEtF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAkB,WAAW,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,+BAA+B,EAAE,MAAM,mEAAmE,CAAC;AAEpH,OAAO,EAAE,iCAAiC,EAAE,MAAM,+DAA+D,CAAC;AAElH,OAAO,EAAE,UAAU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C,KAAa,EAA0B,EAAE;IAC9E,MAAM,SAAS,GAA2B;QACxC,IAAI,EAAE;YACJ,8CAA8C;YAC9C,MAAM,EAAE,MAAM;SACf;QACD,WAAW,EAAE;YACX,gCAAgC,EAAE;gBAChC,UAAU,EAAE,WAAW;gBACvB,MAAM,EAAE,WAAW;aACpB;SACF;QACD,IAAI,EAAE;YACJ,gCAAgC,EAAE;gBAChC,UAAU,EAAE;oBACV,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;iBAC3B;aACF;SACF;KACF,CAAC;IACF,OAAO,eAAe,CAAC,4BAA4B,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useMemo, useRef, useEffect, useState, useCallback } from 'react';\nimport { CallAdapterProvider } from '../../CallComposite/adapter/CallAdapterProvider';\nimport { CallAdapter } from '../../CallComposite';\nimport { PeopleButton } from './PeopleButton';\nimport { concatStyleSets, IStyle, ITheme, mergeStyles, mergeStyleSets, Stack, useTheme } from '@fluentui/react';\nimport { controlBarContainerStyles } from '../../CallComposite/styles/CallControls.styles';\nimport { callControlsContainerStyles } from '../../CallComposite/styles/CallPage.styles';\nimport { useCallWithChatCompositeStrings } from '../../CallWithChatComposite/hooks/useCallWithChatCompositeStrings';\nimport { ChatAdapter } from '../../ChatComposite';\nimport { ChatButtonWithUnreadMessagesBadge } from '../../CallWithChatComposite/ChatButtonWithUnreadMessagesBadge';\nimport { BaseCustomStyles, ControlBarButtonStyles } from '@internal/react-components';\nimport { ControlBar } from '@internal/react-components';\nimport { Microphone } from '../../CallComposite/components/buttons/Microphone';\nimport { Camera } from '../../CallComposite/components/buttons/Camera';\nimport { ScreenShare } from '../../CallComposite/components/buttons/ScreenShare';\nimport { EndCall } from '../../CallComposite/components/buttons/EndCall';\nimport { MoreButton } from '../MoreButton';\nimport { ContainerRectProps } from '../ContainerRectProps';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport {\n CUSTOM_BUTTON_OPTIONS,\n generateCustomCallControlBarButton,\n onFetchCustomButtonPropsTrampoline\n} from './CustomButton';\n/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { DesktopMoreButton } from './DesktopMoreButton';\nimport { isDisabled } from '../../CallComposite/utils';\nimport { HiddenFocusStartPoint } from '../HiddenFocusStartPoint';\nimport { CallWithChatControlOptions } from '../../CallWithChatComposite';\nimport { CommonCallControlOptions } from '../types/CommonCallControlOptions';\n/* @conditional-compile-remove(close-captions) */\nimport { CaptionsSettingsModal } from '../CaptionsSettingsModal';\n\n/**\n * @private\n */\nexport interface CommonCallControlBarProps {\n callAdapter: CallAdapter;\n chatButtonChecked?: boolean;\n peopleButtonChecked: boolean;\n onChatButtonClicked?: () => void;\n onPeopleButtonClicked: () => void;\n onMoreButtonClicked?: () => void;\n mobileView: boolean;\n disableButtonsForLobbyPage: boolean;\n callControls?: boolean | CommonCallControlOptions | CallWithChatControlOptions;\n chatAdapter?: ChatAdapter;\n disableButtonsForHoldScreen?: boolean;\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad?: () => void;\n rtl?: boolean;\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported?: boolean;\n}\n\nconst inferCommonCallControlOptions = (\n mobileView: boolean,\n commonCallControlOptions?: boolean | CallWithChatControlOptions\n): CallWithChatControlOptions | false => {\n if (commonCallControlOptions === false) {\n return false;\n }\n\n const options =\n commonCallControlOptions === true || commonCallControlOptions === undefined ? {} : commonCallControlOptions;\n if (mobileView) {\n // Set to compressed mode when composite is optimized for mobile\n options.displayType = 'compact';\n // Do not show screen share button when composite is optimized for mobile unless the developer\n // has explicitly opted in.\n if (options.screenShareButton !== true) {\n options.screenShareButton = false;\n }\n }\n return options;\n};\n\n/**\n * @private\n */\nexport const CommonCallControlBar = (props: CommonCallControlBarProps & ContainerRectProps): JSX.Element => {\n const theme = useTheme();\n\n const controlBarContainerRef = useRef<HTMLHeadingElement>(null);\n const sidepaneControlsRef = useRef<HTMLHeadingElement>(null);\n const controlBarSizeRef = useRef<HTMLHeadingElement>(null);\n\n const [controlBarButtonsWidth, setControlBarButtonsWidth] = useState(0);\n const [panelsButtonsWidth, setPanelsButtonsWidth] = useState(0);\n const [controlBarContainerWidth, setControlBarContainerWidth] = useState(0);\n\n const [totalButtonsWidth, setTotalButtonsWidth] = useState(0);\n const [isOutOfSpace, setIsOutOfSpace] = useState(false);\n\n const callWithChatStrings = useCallWithChatCompositeStrings();\n const options = inferCommonCallControlOptions(props.mobileView, props.callControls);\n\n /* @conditional-compile-remove(close-captions) */\n const [showCaptionsSettingsModal, setShowCaptionsSettingsModal] = useState(false);\n\n const handleResize = useCallback((): void => {\n setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);\n setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);\n setControlBarContainerWidth(controlBarSizeRef.current ? controlBarSizeRef.current.offsetWidth : 0);\n }, []);\n\n // on load set inital width\n useEffect(() => {\n setControlBarButtonsWidth(controlBarContainerRef.current ? controlBarContainerRef.current.offsetWidth : 0);\n setPanelsButtonsWidth(sidepaneControlsRef.current ? sidepaneControlsRef.current.offsetWidth : 0);\n setControlBarContainerWidth(controlBarSizeRef.current ? controlBarSizeRef.current.offsetWidth : 0);\n }, []);\n\n // get the current width of control bar buttons and panel control buttons when browser size change\n useEffect(() => {\n window.addEventListener('resize', handleResize);\n return () => window.removeEventListener('resize', handleResize);\n }, [handleResize]);\n\n /* when size change, reset total buttons width and compare with the control bar container width\n if the total width of those buttons exceed container width, do not center the control bar buttons based on parent container width\n Instead let them take up the remaining white space on the left */\n useEffect(() => {\n // white space on the left when control bar buttons are centered based on container width + control bar buttons width + panel control buttons width\n setTotalButtonsWidth(\n (controlBarContainerWidth - controlBarButtonsWidth) / 2 + controlBarButtonsWidth + panelsButtonsWidth\n );\n }, [controlBarButtonsWidth, panelsButtonsWidth, controlBarContainerWidth]);\n\n useEffect(() => {\n setIsOutOfSpace(totalButtonsWidth > controlBarContainerWidth);\n }, [totalButtonsWidth, controlBarContainerWidth]);\n\n /* @conditional-compile-remove(close-captions) */\n const openCaptionsSettingsModal = useCallback((): void => {\n setShowCaptionsSettingsModal(true);\n }, []);\n /* @conditional-compile-remove(close-captions) */\n const onDismissCaptionsSettings = useCallback((): void => {\n setShowCaptionsSettingsModal(false);\n }, []);\n\n const chatButtonStrings = useMemo(\n () => ({\n label: callWithChatStrings.chatButtonLabel,\n tooltipOffContent: callWithChatStrings.chatButtonTooltipOpen,\n tooltipOnContent: callWithChatStrings.chatButtonTooltipClose\n }),\n [callWithChatStrings]\n );\n const peopleButtonStrings = useMemo(\n () => ({\n label: callWithChatStrings.peopleButtonLabel,\n tooltipOffContent: callWithChatStrings.peopleButtonTooltipOpen,\n tooltipOnContent: callWithChatStrings.peopleButtonTooltipClose\n }),\n [callWithChatStrings]\n );\n const moreButtonStrings = useMemo(\n () => ({\n label: callWithChatStrings.moreDrawerButtonLabel,\n tooltipContent: callWithChatStrings.moreDrawerButtonTooltip\n }),\n [callWithChatStrings]\n );\n\n const centerContainerStyles = useMemo(() => {\n const styles: BaseCustomStyles = !props.mobileView ? desktopControlBarStyles : {};\n return mergeStyleSets(styles, {\n root: {\n // Enforce a background color on control bar to ensure it matches the composite background color.\n background: theme.semanticColors.bodyBackground\n }\n });\n }, [props.mobileView, theme.semanticColors.bodyBackground]);\n const screenShareButtonStyles = useMemo(\n () => (!props.mobileView ? getDesktopScreenShareButtonStyles(theme) : undefined),\n [props.mobileView, theme]\n );\n const commonButtonStyles = useMemo(\n () => (!props.mobileView ? getDesktopCommonButtonStyles(theme) : undefined),\n [props.mobileView, theme]\n );\n const endCallButtonStyles = useMemo(\n () => (!props.mobileView ? getDesktopEndCallButtonStyles(theme) : undefined),\n [props.mobileView, theme]\n );\n\n const controlBarWrapperDesktopStyles: IStyle = useMemo(\n // only center control bar buttons based on parent container if there are enough space on the screen and not mobile\n () => (!props.mobileView && !isOutOfSpace ? (props.rtl ? wrapperDesktopRtlStyles : wrapperDesktopStyles) : {}),\n [props.mobileView, props.rtl, isOutOfSpace]\n );\n\n // only center control bar buttons based on parent container if there are enough space on the screen and not mobile\n const controlBarDesktopContainerStyles: IStyle = useMemo(\n () => (!props.mobileView && !isOutOfSpace ? { position: 'relative', minHeight: '4.5rem', width: '100%' } : {}),\n [props.mobileView, isOutOfSpace]\n );\n\n /* @conditional-compile-remove(control-bar-button-injection) */\n const customButtons = useMemo(\n () =>\n generateCustomCallControlBarButton(\n onFetchCustomButtonPropsTrampoline(options !== false ? options : undefined),\n options !== false ? options?.displayType : undefined\n ),\n [options]\n );\n\n // when options is false then we want to hide the whole control bar.\n if (options === false) {\n return <></>;\n }\n\n const chatButton = props.chatAdapter ? (\n <ChatButtonWithUnreadMessagesBadge\n chatAdapter={props.chatAdapter}\n checked={props.chatButtonChecked}\n showLabel={options.displayType !== 'compact'}\n isChatPaneVisible={props.chatButtonChecked ?? false}\n onClick={props.onChatButtonClicked}\n disabled={props.disableButtonsForLobbyPage || isDisabled(options.chatButton)}\n strings={chatButtonStrings}\n styles={commonButtonStyles}\n newMessageLabel={callWithChatStrings.chatButtonNewMessageNotificationLabel}\n />\n ) : (\n <></>\n );\n\n return (\n <div ref={controlBarSizeRef}>\n <CallAdapterProvider adapter={props.callAdapter}>\n {\n /* @conditional-compile-remove(close-captions) */ showCaptionsSettingsModal && (\n <CaptionsSettingsModal\n showCaptionsSettingsModal={showCaptionsSettingsModal}\n onDismissCaptionsSettings={onDismissCaptionsSettings}\n />\n )\n }\n </CallAdapterProvider>\n <Stack\n horizontal\n reversed={!props.mobileView && !isOutOfSpace}\n horizontalAlign=\"space-between\"\n className={mergeStyles(\n callControlsContainerStyles,\n controlBarContainerStyles,\n controlBarDesktopContainerStyles\n )}\n >\n <Stack.Item grow className={mergeStyles(controlBarWrapperDesktopStyles)}>\n <CallAdapterProvider adapter={props.callAdapter}>\n <Stack horizontalAlign=\"center\">\n {/*\n HiddenFocusStartPoint is a util component used when we can't ensure the initial element for first\n tab focus is at the top of dom tree. It moves the first-tab focus to the next interact-able element\n immediately after it in the dom tree.\n */}\n <HiddenFocusStartPoint />\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <div ref={controlBarContainerRef}>\n <ControlBar layout=\"horizontal\" styles={centerContainerStyles}>\n {isEnabled(options.microphoneButton) && (\n <Microphone\n displayType={options.displayType}\n styles={commonButtonStyles}\n splitButtonsForDeviceSelection={!props.mobileView}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton)}\n />\n )}\n {isEnabled(options.cameraButton) && (\n <Camera\n displayType={options.displayType}\n styles={commonButtonStyles}\n splitButtonsForDeviceSelection={!props.mobileView}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.cameraButton)}\n />\n )}\n {props.mobileView && isEnabled(options?.chatButton) && chatButton}\n {isEnabled(options.screenShareButton) && (\n <ScreenShare\n option={options.screenShareButton}\n displayType={options.displayType}\n styles={screenShareButtonStyles}\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n disabled={props.disableButtonsForHoldScreen || isDisabled(options.screenShareButton)}\n />\n )}\n {\n /* @conditional-compile-remove(control-bar-button-injection) */\n customButtons['primary']\n ?.slice(\n 0,\n props.mobileView\n ? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS\n : CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS\n )\n .map((CustomButton, i) => {\n return (\n <CustomButton\n key={`primary-custom-button-${i}`}\n styles={commonButtonStyles}\n showLabel={options.displayType !== 'compact'}\n />\n );\n })\n }\n {props.mobileView && (\n <MoreButton\n data-ui-id=\"common-call-composite-more-button\"\n strings={moreButtonStrings}\n onClick={props.onMoreButtonClicked}\n disabled={props.disableButtonsForLobbyPage}\n />\n )}\n {\n /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled(\n options?.moreButton\n ) &&\n /*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled(\n options?.holdButton\n ) &&\n !props.mobileView && (\n <DesktopMoreButton\n disableButtonsForHoldScreen={props.disableButtonsForHoldScreen}\n styles={commonButtonStyles}\n onClickShowDialpad={props.onClickShowDialpad}\n /* @conditional-compile-remove(control-bar-button-injection) */\n callControls={props.callControls}\n /* @conditional-compile-remove(close-captions) */\n isCaptionsSupported={props.isCaptionsSupported}\n /* @conditional-compile-remove(close-captions) */\n onCaptionsSettingsClick={openCaptionsSettingsModal}\n />\n )\n }\n <EndCall displayType=\"compact\" styles={endCallButtonStyles} />\n </ControlBar>\n </div>\n </Stack.Item>\n </Stack>\n </CallAdapterProvider>\n </Stack.Item>\n {!props.mobileView && (\n <Stack.Item>\n <div ref={sidepaneControlsRef}>\n <Stack horizontal className={!props.mobileView ? mergeStyles(desktopButtonContainerStyle) : undefined}>\n {\n /* @conditional-compile-remove(control-bar-button-injection) */\n customButtons['secondary']\n ?.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS)\n .map((CustomButton, i) => {\n return (\n <CustomButton\n key={`secondary-custom-button-${i}`}\n styles={commonButtonStyles}\n showLabel={options.displayType !== 'compact'}\n />\n );\n })\n }\n {isEnabled(options?.peopleButton) && (\n <PeopleButton\n checked={props.peopleButtonChecked}\n ariaLabel={peopleButtonStrings?.label}\n showLabel={options.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"common-call-composite-people-button\"\n disabled={props.disableButtonsForLobbyPage || isDisabled(options.peopleButton)}\n strings={peopleButtonStrings}\n styles={commonButtonStyles}\n />\n )}\n {isEnabled(options?.chatButton) && chatButton}\n </Stack>\n </div>\n </Stack.Item>\n )}\n </Stack>\n </div>\n );\n};\n\nconst desktopButtonContainerStyle: IStyle = {\n padding: '0.75rem',\n columnGap: '0.5rem'\n};\n\nconst desktopControlBarStyles: BaseCustomStyles = {\n root: desktopButtonContainerStyle\n};\n\n{\n /*\n Styling here to ensure the control bar buttons stay in the center of the parent component (control Container) regardless of its siblings\n Need to add 'reversed' to parent container because the styling here reverse the position of the two stack items \n */\n}\nconst wrapperDesktopStyles: IStyle = {\n position: 'absolute',\n left: '50%',\n transform: 'translate(-50%, 0)'\n};\n\nconst wrapperDesktopRtlStyles: IStyle = {\n position: 'absolute',\n right: '50%',\n transform: 'translate(-50%, 0)'\n};\n\nconst getDesktopCommonButtonStyles = (theme: ITheme): ControlBarButtonStyles => ({\n root: {\n border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,\n borderRadius: theme.effects.roundedCorner4,\n minHeight: '2.5rem',\n maxWidth: '12rem' // allot extra space than the regular ControlBarButton. This is to give extra room to have the icon beside the text.\n },\n flexContainer: {\n display: 'flex',\n flexFlow: 'row nowrap'\n },\n textContainer: {\n // Override the default so that label doesn't introduce a new block.\n display: 'inline',\n\n // Ensure width is set to permit child to show ellipsis when there is a label that is too long\n maxWidth: '100%'\n },\n label: {\n fontSize: theme.fonts.medium.fontSize,\n\n // Ensure there is enough space between the icon and text to allow for the unread messages badge in the chat button\n marginLeft: '0.625rem',\n\n // Ensure letters that go above and below the standard text line like 'g', 'y', 'j' are not clipped\n lineHeight: '1.5rem',\n\n // Do not allow very long button texts to ruin the control bar experience, instead ensure long text is truncated and shows ellipsis\n display: 'block',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n splitButtonMenuButton: {\n border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,\n borderTopRightRadius: theme.effects.roundedCorner4,\n borderBottomRightRadius: theme.effects.roundedCorner4,\n borderTopLeftRadius: '0',\n borderBottomLeftRadius: '0'\n },\n splitButtonMenuButtonChecked: {\n // Default colors the menu half similarly for :hover and when button is checked.\n // To align with how the left-half is styled, override the checked style.\n background: 'none'\n }\n});\n\nconst getDesktopScreenShareButtonStyles = (theme: ITheme): ControlBarButtonStyles => {\n const overrideStyles = {\n border: 'none',\n background: theme.palette.themePrimary,\n color: theme.palette.white,\n '* > svg': { fill: theme.palette.white },\n '@media (forced-colors: active)': {\n border: '1px solid',\n borderColor: theme.palette.black\n }\n };\n const overrides: ControlBarButtonStyles = {\n rootChecked: overrideStyles,\n rootCheckedHovered: overrideStyles\n };\n return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);\n};\n\nconst getDesktopEndCallButtonStyles = (theme: ITheme): ControlBarButtonStyles => {\n const overrides: ControlBarButtonStyles = {\n root: {\n // Suppress border around the dark-red button.\n border: 'none'\n },\n rootFocused: {\n '@media (forced-colors: active)': {\n background: 'highlight',\n border: '1px solid'\n }\n },\n icon: {\n '@media (forced-colors: active)': {\n ':focused': {\n color: theme.palette.white\n }\n }\n }\n };\n return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\"../../../../../react-components/src\""]}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { IContextualMenuItem } from '@fluentui/react';
|
2
|
+
import { ControlBarButton, _DrawerMenuItemProps } from "../../../../../react-components/src";
|
3
|
+
import { CustomCallControlButtonCallbackArgs, CustomControlButtonProps } from '../types/CommonCallControlOptions';
|
4
|
+
import { CallControlDisplayType } from '../types/CommonCallControlOptions';
|
5
|
+
import { CommonCallControlOptions } from '../types/CommonCallControlOptions';
|
6
|
+
/**
|
7
|
+
* Max number of Custom Buttons in primary and secondary ControlBar
|
8
|
+
* Does not include existing buttons in the controlBar.
|
9
|
+
*
|
10
|
+
* @private
|
11
|
+
*/
|
12
|
+
export declare const CUSTOM_BUTTON_OPTIONS: {
|
13
|
+
MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS: number;
|
14
|
+
MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS: number;
|
15
|
+
MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS: number;
|
16
|
+
};
|
17
|
+
/** @private */
|
18
|
+
export declare type CustomButtons = {
|
19
|
+
[key in CustomCallControlButtonPlacement]: typeof ControlBarButton[] | undefined;
|
20
|
+
};
|
21
|
+
/** @private */
|
22
|
+
export declare const generateCustomCallControlBarButton: (onFetchCustomButtonProps?: CustomCallControlButtonCallback[] | undefined, displayType?: CallControlDisplayType | undefined) => CustomButtons;
|
23
|
+
/** @private */
|
24
|
+
export declare type CustomDrawerButtons = {
|
25
|
+
[key in CustomCallControlButtonPlacement]: _DrawerMenuItemProps[];
|
26
|
+
};
|
27
|
+
/** @private */
|
28
|
+
export declare const generateCustomCallDrawerButtons: (onFetchCustomButtonProps?: CustomCallControlButtonCallback[] | undefined, displayType?: CallControlDisplayType | undefined) => CustomDrawerButtons;
|
29
|
+
/** @private */
|
30
|
+
export declare type CustomDesktopOverflowButtons = {
|
31
|
+
[key in CustomCallControlButtonPlacement]: IContextualMenuItem[];
|
32
|
+
};
|
33
|
+
/** @private */
|
34
|
+
export declare const generateCustomCallDesktopOverflowButtons: (onFetchCustomButtonProps?: CustomCallControlButtonCallback[] | undefined, displayType?: CallControlDisplayType | undefined) => CustomDesktopOverflowButtons;
|
35
|
+
/** @private */
|
36
|
+
export declare const drawerMenuItemToContextualMenuItem: (item: _DrawerMenuItemProps) => IContextualMenuItem;
|
37
|
+
/**
|
38
|
+
* A callback that returns the props to render a custom {@link ControlBarButton} and {@link DrawerMenuItem}.
|
39
|
+
*
|
40
|
+
* The response indicates where the custom button should be placed.
|
41
|
+
*
|
42
|
+
* Performance tip: This callback is only called when either the callback or its arguments change.
|
43
|
+
* @beta
|
44
|
+
*/
|
45
|
+
export declare type CustomCallControlButtonCallback = (args: CustomCallControlButtonCallbackArgs) => CustomCallControlButtonProps;
|
46
|
+
/**
|
47
|
+
* Placement for a custom button injected in the {@link CommonCallControlBar}.
|
48
|
+
*
|
49
|
+
* 'primary': Place the button(s) on the right end of the center control bar but before the EndCallButton (left end in rtl mode).
|
50
|
+
* 'overflow': Place the buttons(s) on the end of the overflow Menu.
|
51
|
+
* 'secondary': Place the button(s) on the left end of the side control bar (right in rtl mode).
|
52
|
+
*
|
53
|
+
* Multiple buttons assigned the same placement are appended in order.
|
54
|
+
* E.g., if two buttons are placed in 'secondary', they'll both appear on the left end (right end in rtl mode)
|
55
|
+
* in the order provided.
|
56
|
+
*
|
57
|
+
* Only 'primary' placement works when legacy call control is enabled in call composite
|
58
|
+
*
|
59
|
+
* @beta
|
60
|
+
*/
|
61
|
+
export declare type CustomCallControlButtonPlacement = 'primary' | 'overflow' | 'secondary';
|
62
|
+
/**
|
63
|
+
* Response from {@link CustomCallControlButtonCallback}.
|
64
|
+
*
|
65
|
+
* Includes the icon and placement prop necessary to indicate where to place the
|
66
|
+
* {@link ControlBarButton} and a {@link DrawerMenuItem}
|
67
|
+
*
|
68
|
+
* @beta
|
69
|
+
*/
|
70
|
+
export interface CustomCallControlButtonProps extends CustomControlButtonProps {
|
71
|
+
/**
|
72
|
+
* Where to place the custom button relative to other buttons.
|
73
|
+
*/
|
74
|
+
placement: CustomCallControlButtonPlacement;
|
75
|
+
/**
|
76
|
+
* Icon to render. Icon is a non-default icon name that needs to be registered as a
|
77
|
+
* custom icon using registerIcons through fluentui. Examples include icons from the fluentui library
|
78
|
+
*/
|
79
|
+
iconName?: string;
|
80
|
+
}
|
81
|
+
/** @private */
|
82
|
+
export declare const onFetchCustomButtonPropsTrampoline: (options?: CommonCallControlOptions | undefined) => CustomCallControlButtonCallback[] | undefined;
|
83
|
+
//# sourceMappingURL=CustomButton.d.ts.map
|
@@ -0,0 +1,81 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT license.
|
3
|
+
// eslint-disable-next-line no-restricted-imports
|
4
|
+
import { Icon, mergeStyleSets } from '@fluentui/react';
|
5
|
+
import { ControlBarButton } from "../../../../../react-components/src";
|
6
|
+
import React from 'react';
|
7
|
+
/**
|
8
|
+
* Max number of Custom Buttons in primary and secondary ControlBar
|
9
|
+
* Does not include existing buttons in the controlBar.
|
10
|
+
*
|
11
|
+
* @private
|
12
|
+
*/
|
13
|
+
export const CUSTOM_BUTTON_OPTIONS = {
|
14
|
+
MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS: 3,
|
15
|
+
MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS: 1,
|
16
|
+
MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS: 2
|
17
|
+
};
|
18
|
+
/** @private */
|
19
|
+
export const generateCustomCallControlBarButton = (onFetchCustomButtonProps, displayType) => {
|
20
|
+
const allButtonProps = onFetchCustomButtonProps === null || onFetchCustomButtonProps === void 0 ? void 0 : onFetchCustomButtonProps.map((callback) => callback({ displayType }));
|
21
|
+
return {
|
22
|
+
primary: generateCustomControlBarButtons('primary', allButtonProps),
|
23
|
+
secondary: generateCustomControlBarButtons('secondary', allButtonProps),
|
24
|
+
overflow: generateCustomControlBarButtons('overflow', allButtonProps)
|
25
|
+
};
|
26
|
+
};
|
27
|
+
/** @private */
|
28
|
+
const generateCustomControlBarButtons = (placement, customButtons) => customButtons
|
29
|
+
? customButtons
|
30
|
+
.filter((buttonProps) => buttonProps.placement === placement)
|
31
|
+
.map((buttonProps, i) => (internalProps) => {
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
33
|
+
return (React.createElement(ControlBarButton, { ariaDescription: (_a = buttonProps.ariaDescription) !== null && _a !== void 0 ? _a : internalProps.ariaDescription, ariaLabel: (_b = buttonProps.ariaLabel) !== null && _b !== void 0 ? _b : internalProps.ariaLabel, disabled: (_c = buttonProps.disabled) !== null && _c !== void 0 ? _c : internalProps.disabled, id: (_d = buttonProps.id) !== null && _d !== void 0 ? _d : internalProps.id, key: (_e = buttonProps.key) !== null && _e !== void 0 ? _e : `${buttonProps.placement}_${i}`, onClick: (_f = buttonProps.onItemClick) !== null && _f !== void 0 ? _f : internalProps.onClick, onRenderIcon: () => {
|
34
|
+
var _a, _b, _c;
|
35
|
+
return (React.createElement(Icon, { iconName: (_c = (_a = buttonProps.iconName) !== null && _a !== void 0 ? _a : (_b = internalProps.iconProps) === null || _b === void 0 ? void 0 : _b.iconName) !== null && _c !== void 0 ? _c : 'ControlButtonOptions' }));
|
36
|
+
}, showLabel: (_g = buttonProps.showLabel) !== null && _g !== void 0 ? _g : internalProps.showLabel, text: (_h = buttonProps.text) !== null && _h !== void 0 ? _h : internalProps.text, styles: mergeStyleSets(internalProps.styles, buttonProps.styles) }));
|
37
|
+
})
|
38
|
+
: [];
|
39
|
+
/** @private */
|
40
|
+
const generateCustomDrawerButtons = (placement, customButtons) => customButtons
|
41
|
+
? customButtons
|
42
|
+
.filter((buttonProps) => buttonProps.placement === placement)
|
43
|
+
.map((buttonProps, i) => (Object.assign(Object.assign({}, buttonProps), { disabled: buttonProps.disabled, iconProps: { iconName: buttonProps.iconName }, id: buttonProps.id, itemKey: buttonProps.key ? '' + buttonProps.key : `${buttonProps.placement}_${i}`, onItemClick: buttonProps.onItemClick, text: buttonProps.text })))
|
44
|
+
: [];
|
45
|
+
/** @private */
|
46
|
+
export const generateCustomCallDrawerButtons = (onFetchCustomButtonProps, displayType) => {
|
47
|
+
const customButtons = onFetchCustomButtonProps === null || onFetchCustomButtonProps === void 0 ? void 0 : onFetchCustomButtonProps.map((callback) => callback({ displayType }));
|
48
|
+
return {
|
49
|
+
primary: generateCustomDrawerButtons('primary', customButtons),
|
50
|
+
secondary: generateCustomDrawerButtons('secondary', customButtons),
|
51
|
+
overflow: generateCustomDrawerButtons('overflow', customButtons)
|
52
|
+
};
|
53
|
+
};
|
54
|
+
/** @private */
|
55
|
+
export const generateCustomCallDesktopOverflowButtons = (onFetchCustomButtonProps, displayType) => {
|
56
|
+
const customButtons = onFetchCustomButtonProps === null || onFetchCustomButtonProps === void 0 ? void 0 : onFetchCustomButtonProps.map((callback) => callback({ displayType }));
|
57
|
+
return {
|
58
|
+
primary: generateCustomDrawerButtons('primary', customButtons).map(drawerMenuItemToContextualMenuItem),
|
59
|
+
secondary: generateCustomDrawerButtons('secondary', customButtons).map(drawerMenuItemToContextualMenuItem),
|
60
|
+
overflow: generateCustomDrawerButtons('overflow', customButtons).map(drawerMenuItemToContextualMenuItem)
|
61
|
+
};
|
62
|
+
};
|
63
|
+
/** @private */
|
64
|
+
export const drawerMenuItemToContextualMenuItem = (item) => (Object.assign(Object.assign({}, item), { key: item.itemKey, onClick: item.onItemClick
|
65
|
+
? (ev) => {
|
66
|
+
var _a;
|
67
|
+
(_a = item.onItemClick) === null || _a === void 0 ? void 0 : _a.call(item, ev);
|
68
|
+
}
|
69
|
+
: undefined, subMenuProps: item.subMenuProps
|
70
|
+
? {
|
71
|
+
items: item.subMenuProps.map(drawerMenuItemToContextualMenuItem)
|
72
|
+
}
|
73
|
+
: undefined }));
|
74
|
+
/* @conditional-compile-remove(control-bar-button-injection) */
|
75
|
+
/** @private */
|
76
|
+
export const onFetchCustomButtonPropsTrampoline = (options) => {
|
77
|
+
let response = undefined;
|
78
|
+
response = options === null || options === void 0 ? void 0 : options.onFetchCustomButtonProps;
|
79
|
+
return response;
|
80
|
+
};
|
81
|
+
//# sourceMappingURL=CustomButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CustomButton.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/common/ControlBar/CustomButton.tsx"],"names":[],"mappings":"AAAA,uCAA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CAAC,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,IAA0B,EAAuB,EAAE,CAAC,iCAClG,IAAI,KACP,GAAG,EAAE,IAAI,CAAC,OAAO,EACjB,OAAO,EAAE,IAAI,CAAC,WAAW;QACvB,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE;;YACL,MAAA,IAAI,CAAC,WAAW,+CAAhB,IAAI,EAAe,EAAE,CAAC,CAAC;QACzB,CAAC;QACH,CAAC,CAAC,SAAS,EACb,YAAY,EAAE,IAAI,CAAC,YAAY;QAC7B,CAAC,CAAC;YACE,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,kCAAkC,CAAC;SACjE;QACH,CAAC,CAAC,SAAS,IACb,CAAC;AAmDH,+DAA+D;AAC/D,eAAe;AACf,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,OAAkC,EACa,EAAE;IACjD,IAAI,QAAQ,GAAkD,SAAS,CAAC;IACxE,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,wBAAwB,CAAC;IAC7C,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n// eslint-disable-next-line no-restricted-imports\nimport { Icon, IContextualMenuItem, mergeStyleSets } from '@fluentui/react';\nimport { ControlBarButton, _DrawerMenuItemProps } from '@internal/react-components';\nimport React from 'react';\nimport { CustomCallControlButtonCallbackArgs, CustomControlButtonProps } from '../types/CommonCallControlOptions';\nimport { CallControlDisplayType } from '../types/CommonCallControlOptions';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { CommonCallControlOptions } from '../types/CommonCallControlOptions';\n\n/**\n * Max number of Custom Buttons in primary and secondary ControlBar\n * Does not include existing buttons in the controlBar.\n *\n * @private\n */\nexport const CUSTOM_BUTTON_OPTIONS = {\n MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS: 3,\n MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS: 1,\n MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS: 2\n};\n\n/** @private */\nexport type CustomButtons = {\n [key in CustomCallControlButtonPlacement]: typeof ControlBarButton[] | undefined;\n};\n\n/** @private */\nexport const generateCustomCallControlBarButton = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomButtons => {\n const allButtonProps = onFetchCustomButtonProps?.map((callback) => callback({ displayType }));\n\n return {\n primary: generateCustomControlBarButtons('primary', allButtonProps),\n secondary: generateCustomControlBarButtons('secondary', allButtonProps),\n overflow: generateCustomControlBarButtons('overflow', allButtonProps)\n };\n};\n\n/** @private */\nconst generateCustomControlBarButtons = (\n placement: CustomCallControlButtonPlacement,\n customButtons?: CustomCallControlButtonProps[]\n): typeof ControlBarButton[] =>\n customButtons\n ? customButtons\n .filter((buttonProps) => buttonProps.placement === placement)\n .map((buttonProps, i) => (internalProps) => (\n <ControlBarButton\n ariaDescription={buttonProps.ariaDescription ?? internalProps.ariaDescription}\n ariaLabel={buttonProps.ariaLabel ?? internalProps.ariaLabel}\n disabled={buttonProps.disabled ?? internalProps.disabled}\n id={buttonProps.id ?? internalProps.id}\n key={buttonProps.key ?? `${buttonProps.placement}_${i}`}\n onClick={buttonProps.onItemClick ?? internalProps.onClick}\n onRenderIcon={() => (\n <Icon iconName={buttonProps.iconName ?? internalProps.iconProps?.iconName ?? 'ControlButtonOptions'} />\n )}\n showLabel={buttonProps.showLabel ?? internalProps.showLabel}\n text={buttonProps.text ?? internalProps.text}\n styles={mergeStyleSets(internalProps.styles, buttonProps.styles)}\n />\n ))\n : [];\n\n/** @private */\nconst generateCustomDrawerButtons = (\n placement: CustomCallControlButtonPlacement,\n customButtons?: CustomCallControlButtonProps[]\n): _DrawerMenuItemProps[] =>\n customButtons\n ? customButtons\n .filter((buttonProps) => buttonProps.placement === placement)\n .map(\n (buttonProps, i): _DrawerMenuItemProps => ({\n ...buttonProps,\n disabled: buttonProps.disabled,\n iconProps: { iconName: buttonProps.iconName },\n id: buttonProps.id,\n itemKey: buttonProps.key ? '' + buttonProps.key : `${buttonProps.placement}_${i}`,\n onItemClick: buttonProps.onItemClick,\n text: buttonProps.text\n })\n )\n : [];\n\n/** @private */\nexport type CustomDrawerButtons = {\n [key in CustomCallControlButtonPlacement]: _DrawerMenuItemProps[];\n};\n\n/** @private */\nexport const generateCustomCallDrawerButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomDrawerButtons => {\n const customButtons = onFetchCustomButtonProps?.map((callback) => callback({ displayType }));\n return {\n primary: generateCustomDrawerButtons('primary', customButtons),\n secondary: generateCustomDrawerButtons('secondary', customButtons),\n overflow: generateCustomDrawerButtons('overflow', customButtons)\n };\n};\n\n/** @private */\nexport type CustomDesktopOverflowButtons = {\n [key in CustomCallControlButtonPlacement]: IContextualMenuItem[];\n};\n\n/** @private */\nexport const generateCustomCallDesktopOverflowButtons = (\n onFetchCustomButtonProps?: CustomCallControlButtonCallback[],\n displayType?: CallControlDisplayType\n): CustomDesktopOverflowButtons => {\n const customButtons = onFetchCustomButtonProps?.map((callback) => callback({ displayType }));\n return {\n primary: generateCustomDrawerButtons('primary', customButtons).map(drawerMenuItemToContextualMenuItem),\n secondary: generateCustomDrawerButtons('secondary', customButtons).map(drawerMenuItemToContextualMenuItem),\n overflow: generateCustomDrawerButtons('overflow', customButtons).map(drawerMenuItemToContextualMenuItem)\n };\n};\n\n/** @private */\nexport const drawerMenuItemToContextualMenuItem = (item: _DrawerMenuItemProps): IContextualMenuItem => ({\n ...item,\n key: item.itemKey,\n onClick: item.onItemClick\n ? (ev) => {\n item.onItemClick?.(ev);\n }\n : undefined,\n subMenuProps: item.subMenuProps\n ? {\n items: item.subMenuProps.map(drawerMenuItemToContextualMenuItem)\n }\n : undefined\n});\n\n/**\n * A callback that returns the props to render a custom {@link ControlBarButton} and {@link DrawerMenuItem}.\n *\n * The response indicates where the custom button should be placed.\n *\n * Performance tip: This callback is only called when either the callback or its arguments change.\n * @beta\n */\nexport type CustomCallControlButtonCallback = (\n args: CustomCallControlButtonCallbackArgs\n) => CustomCallControlButtonProps;\n\n/**\n * Placement for a custom button injected in the {@link CommonCallControlBar}.\n *\n * 'primary': Place the button(s) on the right end of the center control bar but before the EndCallButton (left end in rtl mode).\n * 'overflow': Place the buttons(s) on the end of the overflow Menu.\n * 'secondary': Place the button(s) on the left end of the side control bar (right in rtl mode).\n *\n * Multiple buttons assigned the same placement are appended in order.\n * E.g., if two buttons are placed in 'secondary', they'll both appear on the left end (right end in rtl mode)\n * in the order provided.\n *\n * Only 'primary' placement works when legacy call control is enabled in call composite\n *\n * @beta\n */\nexport type CustomCallControlButtonPlacement = 'primary' | 'overflow' | 'secondary';\n\n/**\n * Response from {@link CustomCallControlButtonCallback}.\n *\n * Includes the icon and placement prop necessary to indicate where to place the\n * {@link ControlBarButton} and a {@link DrawerMenuItem}\n *\n * @beta\n */\nexport interface CustomCallControlButtonProps extends CustomControlButtonProps {\n /**\n * Where to place the custom button relative to other buttons.\n */\n placement: CustomCallControlButtonPlacement;\n /**\n * Icon to render. Icon is a non-default icon name that needs to be registered as a\n * custom icon using registerIcons through fluentui. Examples include icons from the fluentui library\n */\n iconName?: string;\n}\n\n/* @conditional-compile-remove(control-bar-button-injection) */\n/** @private */\nexport const onFetchCustomButtonPropsTrampoline = (\n options?: CommonCallControlOptions\n): CustomCallControlButtonCallback[] | undefined => {\n let response: CustomCallControlButtonCallback[] | undefined = undefined;\n response = options?.onFetchCustomButtonProps;\n return response;\n};\n\"../../../../../react-components/src\""]}
|
@@ -1,9 +1,13 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { ControlBarButtonProps } from "../../../../../react-components/src";
|
3
|
+
import { CommonCallControlOptions } from '../types/CommonCallControlOptions';
|
3
4
|
/** @private */
|
4
5
|
export interface DesktopMoreButtonProps extends ControlBarButtonProps {
|
5
6
|
disableButtonsForHoldScreen?: boolean;
|
6
7
|
onClickShowDialpad?: () => void;
|
8
|
+
isCaptionsSupported?: boolean;
|
9
|
+
callControls?: boolean | CommonCallControlOptions;
|
10
|
+
onCaptionsSettingsClick?: () => void;
|
7
11
|
}
|
8
12
|
/**
|
9
13
|
*
|