@azure/communication-react 1.5.1-beta.2 → 1.5.1-beta.4
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 +56 -1
- package/CHANGELOG.json +494 -0
- package/README.md +1 -1
- package/dist/communication-react.d.ts +476 -254
- package/dist/dist-cjs/communication-react/index.js +5974 -4543
- 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/handlers/createCommonHandlers.d.ts +12 -4
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +22 -32
- 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 -22
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +8 -3
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +81 -30
- 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 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +19 -21
- 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 +17 -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 +0 -9
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js +3 -6
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +2 -25
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
- 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 -1
- 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 +58 -4
- 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 +5 -1
- 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 +7 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +0 -4
- package/dist/dist-esm/react-components/src/components/CameraButton.js +0 -14
- 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 +1 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +32 -30
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- 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 +16 -1
- 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/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/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/MessageThread.d.ts +36 -4
- package/dist/dist-esm/react-components/src/components/MessageThread.js +88 -42
- package/dist/dist-esm/react-components/src/components/MessageThread.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/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/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/VideoGallery/FloatingLocalVideo.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideo.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +4 -1
- package/dist/dist-esm/react-components/src/components/index.js +7 -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/MessageThread.styles.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +28 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- 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.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/utils.js +4 -0
- package/dist/dist-esm/react-components/src/components/utils.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/locales/de-DE/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +5 -2
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +3 -1
- 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 +5 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +18 -4
- 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 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +67 -30
- 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 +43 -32
- 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 +95 -19
- 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 +1 -1
- 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/buttons/Camera.d.ts +5 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +1 -3
- 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 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +3 -1
- 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 +13 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.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/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 +11 -15
- 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 -5
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +51 -17
- 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 +24 -14
- 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 -4
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +15 -9
- 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/ChatComposite/ChatScreen.js +11 -1
- 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/{CallWithChatComposite → common/ControlBar}/CustomButton.d.ts +19 -16
- package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common/ControlBar}/CustomButton.js +4 -4
- 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 -2
- 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 +109 -5
- 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/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 +7 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -10
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- 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 +14 -15
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.d.ts +0 -29
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js +0 -54
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.d.ts +0 -13
- package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js +0 -35
- package/dist/dist-esm/react-components/src/components/styles/CaptionsBanner.style.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.d.ts +0 -28
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js +0 -194
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.js.map +0 -1
- 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 -86
- 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/VideoEffectsPane.d.ts +0 -11
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +0 -19
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +0 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-react",
|
3
|
-
"version": "1.5.1-beta.
|
3
|
+
"version": "1.5.1-beta.4",
|
4
4
|
"sideEffects": false,
|
5
5
|
"description": "React library for building modern communication user experiences utilizing Azure Communication Services",
|
6
6
|
"keywords": [
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"@azure/core-paging": "~1.1.3",
|
29
29
|
"@azure/core-rest-pipeline": "~1.9.2",
|
30
30
|
"@azure/logger": "1.0.3",
|
31
|
-
"@fluentui/react-file-type-icons": "
|
31
|
+
"@fluentui/react-file-type-icons": "8.8.13",
|
32
32
|
"@fluentui/react-hooks": "~8.6.12",
|
33
33
|
"@fluentui/react-icons": "~2.0.194",
|
34
34
|
"@fluentui/react-northstar": "0.61.0",
|
@@ -47,9 +47,9 @@
|
|
47
47
|
"uuid": "^8.1.0"
|
48
48
|
},
|
49
49
|
"peerDependencies": {
|
50
|
-
"@azure/communication-calling": "1.
|
50
|
+
"@azure/communication-calling": "1.13.0-beta.4",
|
51
51
|
"@azure/communication-calling-effects": "1.0.0-beta.2",
|
52
|
-
"@azure/communication-chat": "
|
52
|
+
"@azure/communication-chat": "1.3.2-beta.1",
|
53
53
|
"@types/react": ">=16.8.0 <18.0.0",
|
54
54
|
"@types/react-dom": ">=16.8.0 <18.0.0",
|
55
55
|
"react": ">=16.8.0 <18.0.0",
|
@@ -83,23 +83,24 @@
|
|
83
83
|
"_by-flavor": "rushx _current-flavor && env-cmd -f ../../common/config/env/.env --use-shell"
|
84
84
|
},
|
85
85
|
"devDependencies": {
|
86
|
-
"@azure/communication-calling": "1.
|
86
|
+
"@azure/communication-calling": "1.13.0-beta.4",
|
87
87
|
"@azure/communication-calling-effects": "1.0.0-beta.2",
|
88
|
-
"@azure/communication-chat": "
|
88
|
+
"@azure/communication-chat": "1.3.2-beta.1",
|
89
89
|
"@azure/core-auth": "1.3.2",
|
90
90
|
"@babel/cli": "~7.16.0",
|
91
91
|
"@babel/core": "~7.16.0",
|
92
|
-
"@internal/calling-component-bindings": "1.5.1-beta.
|
93
|
-
"@internal/calling-stateful-client": "1.5.1-beta.
|
94
|
-
"@internal/chat-component-bindings": "1.5.1-beta.
|
95
|
-
"@internal/chat-stateful-client": "1.5.1-beta.
|
96
|
-
"@internal/fake-backends": "1.5.1-beta.
|
97
|
-
"@internal/react-components": "1.5.1-beta.
|
98
|
-
"@internal/react-composites": "1.5.1-beta.
|
92
|
+
"@internal/calling-component-bindings": "1.5.1-beta.4",
|
93
|
+
"@internal/calling-stateful-client": "1.5.1-beta.4",
|
94
|
+
"@internal/chat-component-bindings": "1.5.1-beta.4",
|
95
|
+
"@internal/chat-stateful-client": "1.5.1-beta.4",
|
96
|
+
"@internal/fake-backends": "1.5.1-beta.4",
|
97
|
+
"@internal/react-components": "1.5.1-beta.4",
|
98
|
+
"@internal/react-composites": "1.5.1-beta.4",
|
99
99
|
"@microsoft/api-documenter": "~7.12.11",
|
100
100
|
"@microsoft/api-extractor": "~7.18.0",
|
101
101
|
"@rollup/plugin-json": "~4.1.0",
|
102
102
|
"@testing-library/jest-dom": "^5.11.4",
|
103
|
+
"@testing-library/react": "12.1.5",
|
103
104
|
"@testing-library/react-hooks": "^3.4.2",
|
104
105
|
"@types/jest": "~26.0.22",
|
105
106
|
"@types/json-stringify-safe": "^5.0.0",
|
@@ -117,8 +118,6 @@
|
|
117
118
|
"cpx": "~1.5.0",
|
118
119
|
"cross-env": "~7.0.3",
|
119
120
|
"env-cmd": "~10.1.0",
|
120
|
-
"enzyme-adapter-react-16": "~1.15.6",
|
121
|
-
"enzyme": "~3.11.0",
|
122
121
|
"eslint-config-prettier": "^6.12.0",
|
123
122
|
"eslint-plugin-header": "^3.1.0",
|
124
123
|
"eslint-plugin-import": "~2.22.1",
|
package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.d.ts
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
import { VideoEffectsFeature } from '@azure/communication-calling';
|
2
|
-
import { LocalVideoStreamState } from './CallClientState';
|
3
|
-
import { CallContext } from './CallContext';
|
4
|
-
import { CallIdRef } from './CallIdRef';
|
5
|
-
/**
|
6
|
-
* Subscribes to a LocalVideoStream's video effects events and updates the call context appropriately.
|
7
|
-
* @private
|
8
|
-
*/
|
9
|
-
export declare class LocalVideoStreamVideoEffectsSubscriber {
|
10
|
-
private _parent;
|
11
|
-
private _context;
|
12
|
-
private _localVideoStream;
|
13
|
-
private _localVideoStreamEffectsAPI;
|
14
|
-
constructor(args: {
|
15
|
-
/** Owner of the local video stream. This is either the Call (referenced by CallIdRef) or is the device manager's unparented view (referenced by 'unparented') */
|
16
|
-
parent: CallIdRef | 'unparented';
|
17
|
-
context: CallContext;
|
18
|
-
localVideoStream: LocalVideoStreamState;
|
19
|
-
localVideoStreamEffectsAPI: VideoEffectsFeature;
|
20
|
-
});
|
21
|
-
private subscribe;
|
22
|
-
unsubscribe: () => void;
|
23
|
-
private effectsStarted;
|
24
|
-
private effectsStopped;
|
25
|
-
private effectsError;
|
26
|
-
private updateEffectsState;
|
27
|
-
}
|
28
|
-
export {};
|
29
|
-
//# sourceMappingURL=LocalVideoStreamVideoEffectsSubscriber.d.ts.map
|
@@ -1,54 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT license.
|
3
|
-
/* @conditional-compile-remove(video-background-effects) */
|
4
|
-
/**
|
5
|
-
* Subscribes to a LocalVideoStream's video effects events and updates the call context appropriately.
|
6
|
-
* @private
|
7
|
-
*/
|
8
|
-
export class LocalVideoStreamVideoEffectsSubscriber {
|
9
|
-
constructor(args) {
|
10
|
-
this.subscribe = () => {
|
11
|
-
this._localVideoStreamEffectsAPI.on('effectsStarted', this.effectsStarted);
|
12
|
-
this._localVideoStreamEffectsAPI.on('effectsStopped', this.effectsStopped);
|
13
|
-
this._localVideoStreamEffectsAPI.on('effectsError', this.effectsError);
|
14
|
-
};
|
15
|
-
this.unsubscribe = () => {
|
16
|
-
this._localVideoStreamEffectsAPI.off('effectsStarted', this.effectsStarted);
|
17
|
-
this._localVideoStreamEffectsAPI.off('effectsStopped', this.effectsStopped);
|
18
|
-
this._localVideoStreamEffectsAPI.off('effectsError', this.effectsError);
|
19
|
-
};
|
20
|
-
this.effectsStarted = (effectName) => {
|
21
|
-
this.updateEffectsState({
|
22
|
-
isActive: true,
|
23
|
-
effectName: effectName
|
24
|
-
});
|
25
|
-
};
|
26
|
-
this.effectsStopped = (effectName) => {
|
27
|
-
this.updateEffectsState({
|
28
|
-
isActive: false,
|
29
|
-
effectName: effectName
|
30
|
-
});
|
31
|
-
};
|
32
|
-
this.effectsError = (error) => {
|
33
|
-
// When there is an error the effects have stopped. Update the state to reflect this.
|
34
|
-
this.updateEffectsState({
|
35
|
-
isActive: false
|
36
|
-
});
|
37
|
-
this._context.teeErrorToState(new Error(error.message), 'VideoEffectsFeature.startEffects');
|
38
|
-
};
|
39
|
-
this.updateEffectsState = (newEffectsState) => {
|
40
|
-
if (this._parent === 'unparented') {
|
41
|
-
this._context.setDeviceManagerUnparentedViewVideoEffects(this._localVideoStream, newEffectsState);
|
42
|
-
}
|
43
|
-
else {
|
44
|
-
this._context.setCallLocalVideoStreamVideoEffects(this._parent.callId, newEffectsState);
|
45
|
-
}
|
46
|
-
};
|
47
|
-
this._parent = args.parent;
|
48
|
-
this._context = args.context;
|
49
|
-
this._localVideoStream = args.localVideoStream;
|
50
|
-
this._localVideoStreamEffectsAPI = args.localVideoStreamEffectsAPI;
|
51
|
-
this.subscribe();
|
52
|
-
}
|
53
|
-
}
|
54
|
-
//# sourceMappingURL=LocalVideoStreamVideoEffectsSubscriber.js.map
|
package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"LocalVideoStreamVideoEffectsSubscriber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BAAkB,CAAC;gBACtB,QAAQ,EAAE,KAAK;aAChB,CAAC,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,kCAAkC,CAAC,CAAC;QAC9F,CAAC,CAAC;QAEM,uBAAkB,GAAG,CAAC,eAAkD,EAAQ,EAAE;YACxF,IAAI,IAAI,CAAC,OAAO,KAAK,YAAY,EAAE;gBACjC,IAAI,CAAC,QAAQ,CAAC,0CAA0C,CAAC,IAAI,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAAC;aACnG;iBAAM;gBACL,IAAI,CAAC,QAAQ,CAAC,mCAAmC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;aACzF;QACH,CAAC,CAAC;QAhDA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAC/C,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC,0BAA0B,CAAC;QAEnE,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;CA2CF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/* @conditional-compile-remove(video-background-effects) */\nimport { VideoEffectErrorPayload, VideoEffectName, VideoEffectsFeature } from '@azure/communication-calling';\n/* @conditional-compile-remove(video-background-effects) */\nimport { LocalVideoStreamState, LocalVideoStreamVideoEffectsState } from './CallClientState';\n/* @conditional-compile-remove(video-background-effects) */\nimport { CallContext } from './CallContext';\n/* @conditional-compile-remove(video-background-effects) */\nimport { CallIdRef } from './CallIdRef';\n\n/* @conditional-compile-remove(video-background-effects) */\n/**\n * Subscribes to a LocalVideoStream's video effects events and updates the call context appropriately.\n * @private\n */\nexport class LocalVideoStreamVideoEffectsSubscriber {\n private _parent: CallIdRef | 'unparented';\n private _context: CallContext;\n private _localVideoStream: LocalVideoStreamState;\n private _localVideoStreamEffectsAPI: VideoEffectsFeature;\n\n constructor(args: {\n /** Owner of the local video stream. This is either the Call (referenced by CallIdRef) or is the device manager's unparented view (referenced by 'unparented') */\n parent: CallIdRef | 'unparented';\n context: CallContext;\n localVideoStream: LocalVideoStreamState;\n localVideoStreamEffectsAPI: VideoEffectsFeature;\n }) {\n this._parent = args.parent;\n this._context = args.context;\n this._localVideoStream = args.localVideoStream;\n this._localVideoStreamEffectsAPI = args.localVideoStreamEffectsAPI;\n\n this.subscribe();\n }\n\n private subscribe = (): void => {\n this._localVideoStreamEffectsAPI.on('effectsStarted', this.effectsStarted);\n this._localVideoStreamEffectsAPI.on('effectsStopped', this.effectsStopped);\n this._localVideoStreamEffectsAPI.on('effectsError', this.effectsError);\n };\n\n public unsubscribe = (): void => {\n this._localVideoStreamEffectsAPI.off('effectsStarted', this.effectsStarted);\n this._localVideoStreamEffectsAPI.off('effectsStopped', this.effectsStopped);\n this._localVideoStreamEffectsAPI.off('effectsError', this.effectsError);\n };\n\n private effectsStarted = (effectName: VideoEffectName): void => {\n this.updateEffectsState({\n isActive: true,\n effectName: effectName\n });\n };\n\n private effectsStopped = (effectName: VideoEffectName): void => {\n this.updateEffectsState({\n isActive: false,\n effectName: effectName\n });\n };\n\n private effectsError = (error: VideoEffectErrorPayload): void => {\n // When there is an error the effects have stopped. Update the state to reflect this.\n this.updateEffectsState({\n isActive: false\n });\n this._context.teeErrorToState(new Error(error.message), 'VideoEffectsFeature.startEffects');\n };\n\n private updateEffectsState = (newEffectsState: LocalVideoStreamVideoEffectsState): void => {\n if (this._parent === 'unparented') {\n this._context.setDeviceManagerUnparentedViewVideoEffects(this._localVideoStream, newEffectsState);\n } else {\n this._context.setCallLocalVideoStreamVideoEffects(this._parent.callId, newEffectsState);\n }\n };\n}\n\nexport {};\n"]}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @private
|
3
|
-
*/
|
4
|
-
export declare const gridContainerClassName: string;
|
5
|
-
/**
|
6
|
-
* @private
|
7
|
-
*/
|
8
|
-
export declare const displayNameClassName: string;
|
9
|
-
/**
|
10
|
-
* @private
|
11
|
-
*/
|
12
|
-
export declare const captionClassName: string;
|
13
|
-
//# sourceMappingURL=CaptionsBanner.style.d.ts.map
|
@@ -1,35 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT license.
|
3
|
-
import { mergeStyles } from '@fluentui/react';
|
4
|
-
import { _pxToRem } from "../../../../acs-ui-common/src";
|
5
|
-
/**
|
6
|
-
* @private
|
7
|
-
*/
|
8
|
-
export const gridContainerClassName = mergeStyles({
|
9
|
-
overflowY: 'scroll',
|
10
|
-
overflowX: 'hidden',
|
11
|
-
width: '100%',
|
12
|
-
height: _pxToRem(60),
|
13
|
-
display: 'grid',
|
14
|
-
gridTemplateColumns: 'auto 1fr',
|
15
|
-
alignItems: 'stretch',
|
16
|
-
columnGap: _pxToRem(16),
|
17
|
-
padding: _pxToRem(8)
|
18
|
-
});
|
19
|
-
/**
|
20
|
-
* @private
|
21
|
-
*/
|
22
|
-
export const displayNameClassName = mergeStyles({
|
23
|
-
fontWeight: 600,
|
24
|
-
fontSize: _pxToRem(12),
|
25
|
-
lineHeight: _pxToRem(30)
|
26
|
-
});
|
27
|
-
/**
|
28
|
-
* @private
|
29
|
-
*/
|
30
|
-
export const captionClassName = mergeStyles({
|
31
|
-
fontWeight: 400,
|
32
|
-
fontSize: _pxToRem(16),
|
33
|
-
lineHeight: _pxToRem(30)
|
34
|
-
});
|
35
|
-
//# sourceMappingURL=CaptionsBanner.style.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CaptionsBanner.style.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/CaptionsBanner.style.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,sCAAgC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAAC;IAChD,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM;IACf,mBAAmB,EAAE,UAAU;IAC/B,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC;IACvB,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;CACrB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;IAC1C,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const gridContainerClassName = mergeStyles({\n overflowY: 'scroll',\n overflowX: 'hidden',\n width: '100%',\n height: _pxToRem(60),\n display: 'grid',\n gridTemplateColumns: 'auto 1fr',\n alignItems: 'stretch',\n columnGap: _pxToRem(16),\n padding: _pxToRem(8)\n});\n\n/**\n * @private\n */\nexport const displayNameClassName = mergeStyles({\n fontWeight: 600,\n fontSize: _pxToRem(12),\n lineHeight: _pxToRem(30)\n});\n\n/**\n * @private\n */\nexport const captionClassName = mergeStyles({\n fontWeight: 400,\n fontSize: _pxToRem(16),\n lineHeight: _pxToRem(30)\n});\n\"../../../../acs-ui-common/src\""]}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { CallAdapter } from '../CallComposite';
|
3
|
-
import { ChatAdapter } from '../ChatComposite';
|
4
|
-
import { CallWithChatControlOptions } from './CallWithChatComposite';
|
5
|
-
import { ContainerRectProps } from '../common/ContainerRectProps';
|
6
|
-
/**
|
7
|
-
* @private
|
8
|
-
*/
|
9
|
-
export interface CallWithChatControlBarProps {
|
10
|
-
callAdapter: CallAdapter;
|
11
|
-
chatButtonChecked: boolean;
|
12
|
-
peopleButtonChecked: boolean;
|
13
|
-
onChatButtonClicked: () => void;
|
14
|
-
onPeopleButtonClicked: () => void;
|
15
|
-
onMoreButtonClicked: () => void;
|
16
|
-
mobileView: boolean;
|
17
|
-
disableButtonsForLobbyPage: boolean;
|
18
|
-
callControls?: boolean | CallWithChatControlOptions;
|
19
|
-
chatAdapter: ChatAdapter;
|
20
|
-
disableButtonsForHoldScreen?: boolean;
|
21
|
-
onClickShowDialpad?: () => void;
|
22
|
-
onShowVideoEffectsPicker?: (showVideoEffectsOptions: boolean) => void;
|
23
|
-
}
|
24
|
-
/**
|
25
|
-
* @private
|
26
|
-
*/
|
27
|
-
export declare const CallWithChatControlBar: (props: CallWithChatControlBarProps & ContainerRectProps) => JSX.Element;
|
28
|
-
//# sourceMappingURL=CallWithChatControlBar.d.ts.map
|
@@ -1,194 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT license.
|
3
|
-
import React, { useMemo } 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 './hooks/useCallWithChatCompositeStrings';
|
10
|
-
import { ChatButtonWithUnreadMessagesBadge } from './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 '../common/MoreButton';
|
17
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
18
|
-
import { CUSTOM_BUTTON_OPTIONS, generateCustomCallWithChatControlBarButton, onFetchCustomButtonPropsTrampoline } from './CustomButton';
|
19
|
-
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
20
|
-
import { DesktopMoreButton } from './components/DesktopMoreButton';
|
21
|
-
import { isDisabled } from '../CallComposite/utils';
|
22
|
-
import { HiddenFocusStartPoint } from '../common/HiddenFocusStartPoint';
|
23
|
-
const inferCallWithChatControlOptions = (mobileView, callWithChatControls) => {
|
24
|
-
if (callWithChatControls === false) {
|
25
|
-
return false;
|
26
|
-
}
|
27
|
-
const options = callWithChatControls === true || callWithChatControls === undefined ? {} : callWithChatControls;
|
28
|
-
if (mobileView) {
|
29
|
-
// Set to compressed mode when composite is optimized for mobile
|
30
|
-
options.displayType = 'compact';
|
31
|
-
// Do not show screen share button when composite is optimized for mobile unless the developer
|
32
|
-
// has explicitly opted in.
|
33
|
-
if (options.screenShareButton !== true) {
|
34
|
-
options.screenShareButton = false;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
return options;
|
38
|
-
};
|
39
|
-
/**
|
40
|
-
* @private
|
41
|
-
*/
|
42
|
-
export const CallWithChatControlBar = (props) => {
|
43
|
-
var _a, _b;
|
44
|
-
const theme = useTheme();
|
45
|
-
const callWithChatStrings = useCallWithChatCompositeStrings();
|
46
|
-
const options = inferCallWithChatControlOptions(props.mobileView, props.callControls);
|
47
|
-
const chatButtonStrings = useMemo(() => ({
|
48
|
-
label: callWithChatStrings.chatButtonLabel,
|
49
|
-
tooltipOffContent: callWithChatStrings.chatButtonTooltipOpen,
|
50
|
-
tooltipOnContent: callWithChatStrings.chatButtonTooltipClose
|
51
|
-
}), [callWithChatStrings]);
|
52
|
-
const peopleButtonStrings = useMemo(() => ({
|
53
|
-
label: callWithChatStrings.peopleButtonLabel,
|
54
|
-
tooltipOffContent: callWithChatStrings.peopleButtonTooltipOpen,
|
55
|
-
tooltipOnContent: callWithChatStrings.peopleButtonTooltipClose
|
56
|
-
}), [callWithChatStrings]);
|
57
|
-
const moreButtonStrings = useMemo(() => ({
|
58
|
-
label: callWithChatStrings.moreDrawerButtonLabel,
|
59
|
-
tooltipContent: callWithChatStrings.moreDrawerButtonTooltip
|
60
|
-
}), [callWithChatStrings]);
|
61
|
-
const centerContainerStyles = useMemo(() => {
|
62
|
-
const styles = !props.mobileView ? desktopControlBarStyles : {};
|
63
|
-
return mergeStyleSets(styles, {
|
64
|
-
root: {
|
65
|
-
// Enforce a background color on control bar to ensure it matches the composite background color.
|
66
|
-
background: theme.semanticColors.bodyBackground
|
67
|
-
}
|
68
|
-
});
|
69
|
-
}, [props.mobileView, theme.semanticColors.bodyBackground]);
|
70
|
-
const screenShareButtonStyles = useMemo(() => (!props.mobileView ? getDesktopScreenShareButtonStyles(theme) : undefined), [props.mobileView, theme]);
|
71
|
-
const commonButtonStyles = useMemo(() => (!props.mobileView ? getDesktopCommonButtonStyles(theme) : undefined), [props.mobileView, theme]);
|
72
|
-
const endCallButtonStyles = useMemo(() => (!props.mobileView ? getDesktopEndCallButtonStyles(theme) : undefined), [props.mobileView, theme]);
|
73
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
74
|
-
const customButtons = useMemo(() => generateCustomCallWithChatControlBarButton(onFetchCustomButtonPropsTrampoline(options !== false ? options : undefined), options !== false ? options === null || options === void 0 ? void 0 : options.displayType : undefined), [options]);
|
75
|
-
// when options is false then we want to hide the whole control bar.
|
76
|
-
if (options === false) {
|
77
|
-
return React.createElement(React.Fragment, null);
|
78
|
-
}
|
79
|
-
const chatButton = (React.createElement(ChatButtonWithUnreadMessagesBadge, { chatAdapter: props.chatAdapter, checked: props.chatButtonChecked, showLabel: options.displayType !== 'compact', isChatPaneVisible: props.chatButtonChecked, onClick: props.onChatButtonClicked, disabled: props.disableButtonsForLobbyPage || isDisabled(options.chatButton), strings: chatButtonStrings, styles: commonButtonStyles, newMessageLabel: callWithChatStrings.chatButtonNewMessageNotificationLabel }));
|
80
|
-
return (React.createElement(Stack, { horizontal: true, className: mergeStyles(callControlsContainerStyles, controlBarContainerStyles) },
|
81
|
-
React.createElement(Stack.Item, { grow: true },
|
82
|
-
React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
|
83
|
-
React.createElement(Stack, { horizontalAlign: "center" },
|
84
|
-
React.createElement(HiddenFocusStartPoint, null),
|
85
|
-
React.createElement(Stack.Item, null,
|
86
|
-
React.createElement(ControlBar, { layout: "horizontal", styles: centerContainerStyles },
|
87
|
-
isEnabled(options.microphoneButton) && (React.createElement(Microphone, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView,
|
88
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
89
|
-
disabled: props.disableButtonsForHoldScreen || isDisabled(options.microphoneButton) })),
|
90
|
-
isEnabled(options.cameraButton) && (React.createElement(Camera, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView,
|
91
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
92
|
-
disabled: props.disableButtonsForHoldScreen || isDisabled(options.cameraButton),
|
93
|
-
/* @conditional-compile-remove(video-background-effects) */
|
94
|
-
onShowVideoEffectsPicker: props.onShowVideoEffectsPicker })),
|
95
|
-
props.mobileView && isEnabled(options === null || options === void 0 ? void 0 : options.chatButton) && chatButton,
|
96
|
-
isEnabled(options.screenShareButton) && (React.createElement(ScreenShare, { option: options.screenShareButton, displayType: options.displayType, styles: screenShareButtonStyles,
|
97
|
-
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
98
|
-
disabled: props.disableButtonsForHoldScreen || isDisabled(options.screenShareButton) })),
|
99
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
100
|
-
(_a = customButtons['primary']) === null || _a === void 0 ? void 0 :
|
101
|
-
_a.slice(0, props.mobileView
|
102
|
-
? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS
|
103
|
-
: CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
104
|
-
return (React.createElement(CustomButton, { key: `primary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
105
|
-
}),
|
106
|
-
props.mobileView && (React.createElement(MoreButton, { "data-ui-id": "call-with-chat-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage })),
|
107
|
-
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled(options === null || options === void 0 ? void 0 : options.moreButton) &&
|
108
|
-
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ isEnabled(options === null || options === void 0 ? void 0 : options.holdButton) &&
|
109
|
-
!props.mobileView && (React.createElement(DesktopMoreButton, { disableButtonsForHoldScreen: props.disableButtonsForHoldScreen, styles: commonButtonStyles, onClickShowDialpad: props.onClickShowDialpad,
|
110
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
111
|
-
callControls: props.callControls })),
|
112
|
-
React.createElement(EndCall, { displayType: "compact", styles: endCallButtonStyles })))))),
|
113
|
-
!props.mobileView && (React.createElement(Stack, { horizontal: true, className: !props.mobileView ? mergeStyles(desktopButtonContainerStyle) : undefined },
|
114
|
-
/* @conditional-compile-remove(control-bar-button-injection) */
|
115
|
-
(_b = customButtons['secondary']) === null || _b === void 0 ? void 0 :
|
116
|
-
_b.slice(0, CUSTOM_BUTTON_OPTIONS.MAX_SECONDARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
117
|
-
return (React.createElement(CustomButton, { key: `secondary-custom-button-${i}`, styles: commonButtonStyles, showLabel: options.displayType !== 'compact' }));
|
118
|
-
}),
|
119
|
-
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": "call-with-chat-composite-people-button", disabled: props.disableButtonsForLobbyPage || isDisabled(options.peopleButton), strings: peopleButtonStrings, styles: commonButtonStyles })),
|
120
|
-
isEnabled(options === null || options === void 0 ? void 0 : options.chatButton) && chatButton))));
|
121
|
-
};
|
122
|
-
const desktopButtonContainerStyle = {
|
123
|
-
padding: '0.75rem',
|
124
|
-
columnGap: '0.5rem'
|
125
|
-
};
|
126
|
-
const desktopControlBarStyles = {
|
127
|
-
root: desktopButtonContainerStyle
|
128
|
-
};
|
129
|
-
const getDesktopCommonButtonStyles = (theme) => ({
|
130
|
-
root: {
|
131
|
-
border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,
|
132
|
-
borderRadius: theme.effects.roundedCorner4,
|
133
|
-
minHeight: '2.5rem',
|
134
|
-
maxWidth: '12rem' // allot extra space than the regular ControlBarButton. This is to give extra room to have the icon beside the text.
|
135
|
-
},
|
136
|
-
flexContainer: {
|
137
|
-
display: 'flex',
|
138
|
-
flexFlow: 'row nowrap'
|
139
|
-
},
|
140
|
-
textContainer: {
|
141
|
-
// Override the default so that label doesn't introduce a new block.
|
142
|
-
display: 'inline',
|
143
|
-
// Ensure width is set to permit child to show ellipsis when there is a label that is too long
|
144
|
-
maxWidth: '100%'
|
145
|
-
},
|
146
|
-
label: {
|
147
|
-
fontSize: theme.fonts.medium.fontSize,
|
148
|
-
// Ensure there is enough space between the icon and text to allow for the unread messages badge in the chat button
|
149
|
-
marginLeft: '0.625rem',
|
150
|
-
// Ensure letters that go above and below the standard text line like 'g', 'y', 'j' are not clipped
|
151
|
-
lineHeight: '1.5rem',
|
152
|
-
// Do not allow very long button texts to ruin the control bar experience, instead ensure long text is truncated and shows ellipsis
|
153
|
-
display: 'block',
|
154
|
-
textOverflow: 'ellipsis',
|
155
|
-
whiteSpace: 'nowrap',
|
156
|
-
overflow: 'hidden'
|
157
|
-
},
|
158
|
-
splitButtonMenuButton: {
|
159
|
-
border: `solid 1px ${theme.palette.neutralQuaternaryAlt}`,
|
160
|
-
borderTopRightRadius: theme.effects.roundedCorner4,
|
161
|
-
borderBottomRightRadius: theme.effects.roundedCorner4,
|
162
|
-
borderTopLeftRadius: '0',
|
163
|
-
borderBottomLeftRadius: '0'
|
164
|
-
},
|
165
|
-
splitButtonMenuButtonChecked: {
|
166
|
-
// Default colors the menu half similarly for :hover and when button is checked.
|
167
|
-
// To align with how the left-half is styled, override the checked style.
|
168
|
-
background: 'none'
|
169
|
-
}
|
170
|
-
});
|
171
|
-
const getDesktopScreenShareButtonStyles = (theme) => {
|
172
|
-
const overrideStyles = {
|
173
|
-
border: 'none',
|
174
|
-
background: theme.palette.themePrimary,
|
175
|
-
color: theme.palette.white,
|
176
|
-
'* > svg': { fill: theme.palette.white }
|
177
|
-
};
|
178
|
-
const overrides = {
|
179
|
-
rootChecked: overrideStyles,
|
180
|
-
rootCheckedHovered: overrideStyles
|
181
|
-
};
|
182
|
-
return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);
|
183
|
-
};
|
184
|
-
const getDesktopEndCallButtonStyles = (theme) => {
|
185
|
-
const overrides = {
|
186
|
-
root: {
|
187
|
-
// Suppress border around the dark-red button.
|
188
|
-
border: 'none'
|
189
|
-
}
|
190
|
-
};
|
191
|
-
return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);
|
192
|
-
};
|
193
|
-
const isEnabled = (option) => option !== false;
|
194
|
-
//# sourceMappingURL=CallWithChatControlBar.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CallWithChatControlBar.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/CallWithChatControlBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,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,6CAA6C,CAAC;AACxF,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAE1F,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,OAAO,EAAE,UAAU,EAAE,yCAAmC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,gDAAgD,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,6CAA6C,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGlD,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EAAE,MAAM;QACd,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;QACtC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK;QAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE;KACzC,CAAC;IACF,MAAM,SAAS,GAA2B;QACxC,WAAW,EAAE,cAAc;QAC3B,kBAAkB,EAAE,cAAc;KACnC,CAAC;IACF,OAAO,eAAe,CAAC,4BAA4B,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,6BAA6B,GAAG,CAAC,KAAa,EAA0B,EAAE;IAC9E,MAAM,SAAS,GAA2B;QACxC,IAAI,EAAE;YACJ,8CAA8C;YAC9C,MAAM,EAAE,MAAM;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 } 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 './hooks/useCallWithChatCompositeStrings';\nimport { ChatAdapter } from '../ChatComposite';\nimport { ChatButtonWithUnreadMessagesBadge } from './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 '../common/MoreButton';\nimport { CallWithChatControlOptions } from './CallWithChatComposite';\nimport { ContainerRectProps } from '../common/ContainerRectProps';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport {\n CUSTOM_BUTTON_OPTIONS,\n generateCustomCallWithChatControlBarButton,\n onFetchCustomButtonPropsTrampoline\n} from './CustomButton';\n/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { DesktopMoreButton } from './components/DesktopMoreButton';\nimport { isDisabled } from '../CallComposite/utils';\nimport { HiddenFocusStartPoint } from '../common/HiddenFocusStartPoint';\n\n/**\n * @private\n */\nexport interface CallWithChatControlBarProps {\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 | CallWithChatControlOptions;\n chatAdapter: ChatAdapter;\n disableButtonsForHoldScreen?: boolean;\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad?: () => void;\n /* @conditional-compile-remove(video-background-effects) */\n onShowVideoEffectsPicker?: (showVideoEffectsOptions: boolean) => void;\n}\n\nconst inferCallWithChatControlOptions = (\n mobileView: boolean,\n callWithChatControls?: boolean | CallWithChatControlOptions\n): CallWithChatControlOptions | false => {\n if (callWithChatControls === false) {\n return false;\n }\n\n const options = callWithChatControls === true || callWithChatControls === undefined ? {} : callWithChatControls;\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 CallWithChatControlBar = (props: CallWithChatControlBarProps & ContainerRectProps): JSX.Element => {\n const theme = useTheme();\n const callWithChatStrings = useCallWithChatCompositeStrings();\n const options = inferCallWithChatControlOptions(props.mobileView, props.callControls);\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 /* @conditional-compile-remove(control-bar-button-injection) */\n const customButtons = useMemo(\n () =>\n generateCustomCallWithChatControlBarButton(\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 = (\n <ChatButtonWithUnreadMessagesBadge\n chatAdapter={props.chatAdapter}\n checked={props.chatButtonChecked}\n showLabel={options.displayType !== 'compact'}\n isChatPaneVisible={props.chatButtonChecked}\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 return (\n <Stack horizontal className={mergeStyles(callControlsContainerStyles, controlBarContainerStyles)}>\n <Stack.Item grow>\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 <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 /* @conditional-compile-remove(video-background-effects) */\n onShowVideoEffectsPicker={props.onShowVideoEffectsPicker}\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=\"call-with-chat-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 />\n )\n }\n <EndCall displayType=\"compact\" styles={endCallButtonStyles} />\n </ControlBar>\n </Stack.Item>\n </Stack>\n </CallAdapterProvider>\n </Stack.Item>\n {!props.mobileView && (\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=\"call-with-chat-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 )}\n </Stack>\n );\n};\n\nconst desktopButtonContainerStyle: IStyle = {\n padding: '0.75rem',\n columnGap: '0.5rem'\n};\n\nconst desktopControlBarStyles: BaseCustomStyles = {\n root: desktopButtonContainerStyle\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 };\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 };\n return concatStyleSets(getDesktopCommonButtonStyles(theme), overrides);\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\"../../../../react-components/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CustomButton.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CustomButton.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/CustomButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,iDAAiD;AACjD,OAAO,EAAE,IAAI,EAAuB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAwB,yCAAmC;AACpF,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,kCAAkC,EAAE,CAAC;IACrC,iCAAiC,EAAE,CAA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AC;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;AAiDH,+DAA+D;AAC/D,eAAe;AACf,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAChD,OAAoC,EACmB,EAAE;IACzD,IAAI,QAAQ,GAA0D,SAAS,CAAC;IAChF,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 {\n CallControlDisplayType,\n CustomCallControlButtonCallbackArgs,\n CustomControlButtonProps\n} from '../CallComposite/types/CallControlOptions';\n/* @conditional-compile-remove(control-bar-button-injection) */\nimport { CallWithChatControlOptions } from './CallWithChatComposite';\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 CustomCallWithChatControlButtonPlacement]: typeof ControlBarButton[] | undefined;\n};\n\n/** @private */\nexport const generateCustomCallWithChatControlBarButton = (\n onFetchCustomButtonProps?: CustomCallWithChatControlButtonCallback[],\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: CustomCallWithChatControlButtonPlacement,\n customButtons?: CustomCallWithChatControlButtonProps[]\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: CustomCallWithChatControlButtonPlacement,\n customButtons?: CustomCallWithChatControlButtonProps[]\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 CustomCallWithChatControlButtonPlacement]: _DrawerMenuItemProps[];\n};\n\n/** @private */\nexport const generateCustomCallWithChatDrawerButtons = (\n onFetchCustomButtonProps?: CustomCallWithChatControlButtonCallback[],\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 CustomCallWithChatControlButtonPlacement]: IContextualMenuItem[];\n};\n\n/** @private */\nexport const generateCustomCallWithChatDesktopOverflowButtons = (\n onFetchCustomButtonProps?: CustomCallWithChatControlButtonCallback[],\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 CustomCallWithChatControlButtonCallback = (\n args: CustomCallControlButtonCallbackArgs\n) => CustomCallWithChatControlButtonProps;\n\n/**\n * Placement for a custom button injected in the {@link CallWithChatControlBar}.\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 * @beta\n */\nexport type CustomCallWithChatControlButtonPlacement = 'primary' | 'overflow' | 'secondary';\n\n/**\n * Response from {@link CustomCallWithChatControlButtonCallback}.\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 CustomCallWithChatControlButtonProps extends CustomControlButtonProps {\n /**\n * Where to place the custom button relative to other buttons.\n */\n placement: CustomCallWithChatControlButtonPlacement;\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?: CallWithChatControlOptions\n): CustomCallWithChatControlButtonCallback[] | undefined => {\n let response: CustomCallWithChatControlButtonCallback[] | undefined = undefined;\n response = options?.onFetchCustomButtonProps;\n return response;\n};\n\"../../../../react-components/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PeopleButton.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"PeopleButton.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/PeopleButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAiD,QAAQ,EAAE,yCAAmC;AACvH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,IAAI,GAAG,GAAgB,EAAE,CAAC,oBAAC,yBAAyB,IAAC,QAAQ,EAAE,wBAAwB,GAAI,CAAC;AAElG;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAA4B,EAAe,EAAE;IACxE,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACpE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,MAAM,GAA2B,OAAO,CAC5C,GAAG,EAAE;;QACH,OAAA,eAAe,CACb;YACE,WAAW,EAAE;gBACX,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;aACvC;SACF,EACD,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CACnB,CAAA;KAAA,EACH,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAC3C,CAAC;IAEF,OAAO,CACL,oBAAC,gBAAgB,oBACX,KAAK,IACT,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,sBAAsB,EAChC,cAAc,EAAE,cAAc,aAAd,cAAc,cAAd,cAAc,GAAI,IAAI,EACtC,eAAe,EAAE,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,IAAI,EACxC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,IACd,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useMemo } from 'react';\nimport { ControlBarButton, ControlBarButtonProps, ControlBarButtonStyles, useTheme } from '@internal/react-components';\nimport { concatStyleSets } from '@fluentui/react';\nimport { CallWithChatCompositeIcon } from '../common/icons';\n\nconst icon = (): JSX.Element => <CallWithChatCompositeIcon iconName={'ControlBarPeopleButton'} />;\n\n/**\n * @private\n */\nexport const PeopleButton = (props: ControlBarButtonProps): JSX.Element => {\n const { strings, onRenderOnIcon, onRenderOffIcon, onClick } = props;\n const theme = useTheme();\n const styles: ControlBarButtonStyles = useMemo(\n () =>\n concatStyleSets(\n {\n rootChecked: {\n background: theme.palette.neutralLight\n }\n },\n props.styles ?? {}\n ),\n [props.styles, theme.palette.neutralLight]\n );\n\n return (\n <ControlBarButton\n {...props}\n strings={strings}\n labelKey={'peopleButtonLabelKey'}\n onRenderOnIcon={onRenderOnIcon ?? icon}\n onRenderOffIcon={onRenderOffIcon ?? icon}\n onClick={onClick}\n styles={styles}\n />\n );\n};\n\"../../../../react-components/src\""]}
|
package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.js
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT license.
|
3
|
-
import React, { useMemo } from 'react';
|
4
|
-
import { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';
|
5
|
-
import { MoreDrawer } from './components/MoreDrawer';
|
6
|
-
import { moreDrawerSelector } from './selectors/moreDrawerSelector';
|
7
|
-
import { useSelector } from '../CallComposite/hooks/useSelector';
|
8
|
-
import { useHandlers } from '../CallComposite/hooks/useHandlers';
|
9
|
-
/** @private */
|
10
|
-
export const PreparedMoreDrawer = (props) => {
|
11
|
-
const strings = useCallWithChatCompositeStrings();
|
12
|
-
const moreDrawerStrings = useMemo(() => ({
|
13
|
-
peopleButtonLabel: strings.peopleButtonLabel,
|
14
|
-
audioDeviceMenuTitle: strings.moreDrawerAudioDeviceMenuTitle,
|
15
|
-
microphoneMenuTitle: strings.moreDrawerMicrophoneMenuTitle,
|
16
|
-
speakerMenuTitle: strings.moreDrawerSpeakerMenuTitle
|
17
|
-
}), [strings]);
|
18
|
-
const deviceProps = useSelector(moreDrawerSelector);
|
19
|
-
const callHandlers = useHandlers(MoreDrawer);
|
20
|
-
return React.createElement(MoreDrawer, Object.assign({}, props, deviceProps, callHandlers, { strings: moreDrawerStrings }));
|
21
|
-
};
|
22
|
-
//# sourceMappingURL=PreparedMoreDrawer.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"PreparedMoreDrawer.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/PreparedMoreDrawer.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAqB,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAajE,eAAe;AACf,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAA8B,EAAe,EAAE;IAChF,MAAM,OAAO,GAAG,+BAA+B,EAAE,CAAC;IAClD,MAAM,iBAAiB,GAAsB,OAAO,CAClD,GAAG,EAAE,CAAC,CAAC;QACL,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;QAC5C,oBAAoB,EAAE,OAAO,CAAC,8BAA8B;QAC5D,mBAAmB,EAAE,OAAO,CAAC,6BAA6B;QAC1D,gBAAgB,EAAE,OAAO,CAAC,0BAA0B;KACrD,CAAC,EACF,CAAC,OAAO,CAAC,CACV,CAAC;IACF,MAAM,WAAW,GAAG,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IAC7C,OAAO,oBAAC,UAAU,oBAAK,KAAK,EAAM,WAAW,EAAM,YAAY,IAAE,OAAO,EAAE,iBAAiB,IAAI,CAAC;AAClG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useMemo } from 'react';\nimport { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';\nimport { MoreDrawer, MoreDrawerStrings } from './components/MoreDrawer';\nimport { moreDrawerSelector } from './selectors/moreDrawerSelector';\nimport { useSelector } from '../CallComposite/hooks/useSelector';\nimport { useHandlers } from '../CallComposite/hooks/useHandlers';\nimport { CallWithChatControlOptions } from './CallWithChatComposite';\n\n/** @private */\nexport interface PreparedMoreDrawerProps {\n onLightDismiss: () => void;\n onPeopleButtonClicked: () => void;\n callControls?: boolean | CallWithChatControlOptions;\n /* @conditional-compile-remove(PSTN-calls) */\n onClickShowDialpad?: () => void;\n disableButtonsForHoldScreen?: boolean;\n}\n\n/** @private */\nexport const PreparedMoreDrawer = (props: PreparedMoreDrawerProps): JSX.Element => {\n const strings = useCallWithChatCompositeStrings();\n const moreDrawerStrings: MoreDrawerStrings = useMemo(\n () => ({\n peopleButtonLabel: strings.peopleButtonLabel,\n audioDeviceMenuTitle: strings.moreDrawerAudioDeviceMenuTitle,\n microphoneMenuTitle: strings.moreDrawerMicrophoneMenuTitle,\n speakerMenuTitle: strings.moreDrawerSpeakerMenuTitle\n }),\n [strings]\n );\n const deviceProps = useSelector(moreDrawerSelector);\n const callHandlers = useHandlers(MoreDrawer);\n return <MoreDrawer {...props} {...deviceProps} {...callHandlers} strings={moreDrawerStrings} />;\n};\n"]}
|