@azure/communication-react 1.13.0-beta.1 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +157 -1968
- package/dist/dist-cjs/communication-react/index.js +2068 -7634
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/areEqual.d.ts +0 -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 +1 -2
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +0 -5
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +0 -12
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -13
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +0 -4
- 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 +2 -10
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +0 -14
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js +0 -10
- package/dist/dist-esm/calling-component-bindings/src/handlers/createDefaultCallingHandlersForComponent.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +1 -15
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +1 -4
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +0 -12
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/index.d.ts +0 -6
- package/dist/dist-esm/calling-component-bindings/src/index.js +0 -8
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +0 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +2 -8
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +3 -4
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +2 -14
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -20
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +0 -7
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +0 -12
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +2 -9
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +0 -3
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +5 -6
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +1 -15
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +1 -2
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +0 -5
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +3 -24
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -5
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +1 -40
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +8 -12
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -8
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -7
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +0 -1
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +0 -11
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +1 -25
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +2 -33
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +0 -8
- 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 +0 -2
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.d.ts +1 -5
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/hooks/usePropsFor.d.ts +0 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +5 -173
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js +3 -3
- package/dist/dist-esm/chat-component-bindings/src/utils/updateMessagesWithAttached.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.d.ts +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatClientState.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.d.ts +2 -5
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.js +2 -24
- package/dist/dist-esm/chat-stateful-client/src/ChatContext.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js +1 -3
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js +1 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +1 -4
- 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 +0 -2
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +1 -28
- package/dist/dist-esm/communication-react/src/index.js +0 -14
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/communication-react/src/mergedHooks.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Announcer/Announcer.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Announcer/LiveMessage.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Announcer/MessageBlock.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Announcer.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Caption.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +1 -20
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +2 -7
- 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 -7
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +12 -43
- 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 +1 -23
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +8 -37
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.d.ts +1 -11
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js +2 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +0 -35
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +1 -56
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.d.ts +1 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js +5 -27
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ComplianceBanner/BannerMessage.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ComplianceBanner/ComplianceBanner.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ComplianceBanner/DelayedUpdateBanner.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ControlBarButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ControlButtonTooltip.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/DevicePermissionDropdown.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +7 -8
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +2 -2
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerLightDismiss.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/EndCallButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/FileCard.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +1 -41
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +4 -25
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileUploadCards.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/HighContrastAwareIcon.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +0 -2
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +0 -18
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/MessageStatusIndicator.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +2 -47
- package/dist/dist-esm/react-components/src/components/MessageThread.js +3 -16
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MicrophoneButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +0 -3
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +0 -21
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +4 -22
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantsButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/PictureInPictureInPicture/PictureInPictureInPicture.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/RaiseHandButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +6 -25
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ScreenShareButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/SendBox.d.ts +0 -42
- package/dist/dist-esm/react-components/src/components/SendBox.js +9 -81
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js +1 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/StreamMedia.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/SystemMessage.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/TroubleshootingGuideErrorBar.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/TypingIndicator.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +0 -2
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +0 -2
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +0 -24
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +0 -2
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/PresetVideoEffectsItems.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +1 -1
- 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 +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FocusContentLayout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/ScrollableHorizontalGallery.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +1 -5
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +3 -18
- 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 +0 -9
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +6 -42
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +1 -9
- package/dist/dist-esm/react-components/src/components/VideoTile.js +7 -41
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.js +56 -56
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +1 -21
- package/dist/dist-esm/react-components/src/components/index.js +0 -12
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +12 -5
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +5 -3
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -3
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.d.ts +6 -3
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +14 -6
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/common.js +0 -4
- package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +1 -2
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +0 -4
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +1 -5
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +0 -1
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -60
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +4 -2
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +9 -3
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +9 -3
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +0 -13
- package/dist/dist-esm/react-components/src/theming/icons.js +3 -111
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/themes.d.ts +2 -21
- package/dist/dist-esm/react-components/src/theming/themes.js +0 -16
- package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +1 -34
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/OnRender.d.ts +0 -9
- package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +1 -44
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js +1 -2
- package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +0 -6
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +0 -2
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +1 -74
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +15 -28
- 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 +29 -105
- 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 +50 -75
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +101 -289
- 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 +17 -99
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.d.ts +1 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +1 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +3 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +0 -2
- 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.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +11 -25
- 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.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -38
- 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/CapabilitiesChangedNotificationBar.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +0 -27
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js +2 -20
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageErrorBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.d.ts +0 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +0 -27
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +0 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +5 -31
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +2 -5
- 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/MutedNotification.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/StartCallButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SvgWithWordWrapping.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/EndCall.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Participants.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/RaiseHand.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +2 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +7 -20
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/usePropsFor.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +4 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +0 -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/CallPage.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +44 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +6 -80
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/{HoldPage.d.ts → DtmfDialpadPage.d.ts} +8 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js +80 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/DtmfDialpadPage.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +3 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js +11 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +0 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +0 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.js +18 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/DtmfDialpadPage.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/MediaGalleryUtils.js +26 -0
- 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.d.ts +15 -16
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +24 -97
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.js +30 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/timerUtils.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +1 -62
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +5 -31
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButtonWithUnreadMessagesBadge.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/NotificationIcon.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +0 -32
- 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 +10 -33
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +16 -108
- 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 +5 -55
- 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 +4 -10
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +7 -37
- 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 +0 -13
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +1 -37
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -22
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +1 -9
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.d.ts +0 -21
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +1 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatHeader.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +6 -133
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +0 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +3 -32
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +5 -129
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +0 -28
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +1 -159
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -17
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js +0 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapterProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js +1 -8
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/FileUploadButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +1 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/usePropsFor.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +0 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +1 -6
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +0 -15
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +0 -6
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +2 -3
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +25 -14
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +40 -27
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.js +41 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DtmfDialerButton.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/CaptionSettingsDrawer.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +8 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +43 -28
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/HiddenFocusStartPoint.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/MoreButton.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +1 -3
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +2 -14
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +4 -24
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +5 -13
- 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 +8 -13
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +20 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +29 -2
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +29 -2
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +4 -4
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +0 -45
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +0 -91
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +0 -19
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +0 -91
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +0 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +0 -23
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +0 -49
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +0 -1
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.d.ts +0 -32
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +0 -129
- package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +0 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +0 -15
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +0 -69
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +0 -43
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +0 -75
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +0 -75
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +0 -105
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +0 -68
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +0 -86
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +0 -39
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +0 -49
- package/dist/dist-esm/react-components/src/components/HoldButton.js +0 -25
- package/dist/dist-esm/react-components/src/components/HoldButton.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +0 -71
- package/dist/dist-esm/react-components/src/components/ImageGallery.js +0 -56
- package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +0 -121
- package/dist/dist-esm/react-components/src/components/MentionPopover.js +0 -123
- package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.d.ts +0 -14
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js +0 -18
- package/dist/dist-esm/react-components/src/components/SendBoxErrors.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +0 -24
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +0 -550
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +0 -152
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +0 -816
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +0 -58
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +0 -144
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +0 -68
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +0 -205
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +0 -26
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +0 -69
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +0 -38
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +0 -92
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.d.ts +0 -5
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.js +0 -32
- package/dist/dist-esm/react-components/src/components/styles/Stack.style.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +0 -26
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +0 -67
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/utils/merge.js +0 -16
- package/dist/dist-esm/react-components/src/components/utils/merge.js.map +0 -1
- package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +0 -6
- package/dist/dist-esm/react-components/src/theming/icons.styles.js +0 -25
- package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.d.ts +0 -48
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +0 -218
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.d.ts +0 -12
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +0 -93
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +0 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +0 -26
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +0 -28
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +0 -54
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +0 -32
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +0 -81
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +0 -18
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +0 -18
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +0 -23
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.d.ts +0 -6
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +0 -11
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +0 -12
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +0 -15
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +0 -27
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +0 -14
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +0 -22
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +0 -107
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +0 -17
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +0 -32
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +0 -22
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +0 -74
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +0 -15
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +0 -61
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +0 -1
@@ -1,5 +1,3 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
1
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4
2
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
5
3
|
return new (P || (P = Promise))(function (resolve, reject) {
|
@@ -9,15 +7,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
9
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
10
8
|
});
|
11
9
|
};
|
12
|
-
|
13
|
-
|
10
|
+
// Copyright (c) Microsoft Corporation.
|
11
|
+
// Licensed under the MIT License.
|
14
12
|
import { mergeStyles, Stack } from '@fluentui/react';
|
15
|
-
/* @conditional-compile-remove(image-gallery) */
|
16
|
-
import { PersonaSize } from '@fluentui/react';
|
17
13
|
import { ErrorBar, MessageThread, SendBox, TypingIndicator, useTheme } from "../../../../react-components/src";
|
18
14
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
19
|
-
/* @conditional-compile-remove(image-gallery) */
|
20
|
-
import { useState } from 'react';
|
21
15
|
import { AvatarPersona } from '../common/AvatarPersona';
|
22
16
|
import { useAdapter } from './adapter/ChatAdapterProvider';
|
23
17
|
import { ChatHeader, getHeaderProps } from './ChatHeader';
|
@@ -26,33 +20,13 @@ import { useAdaptedSelector } from './hooks/useAdaptedSelector';
|
|
26
20
|
import { usePropsFor } from './hooks/usePropsFor';
|
27
21
|
import { chatArea, chatContainer, chatWrapper, messageThreadChatCompositeStyles, sendboxContainerStyles, typingIndicatorContainerStyles } from './styles/Chat.styles';
|
28
22
|
import { participantListContainerPadding } from '../common/styles/ParticipantContainer.styles';
|
29
|
-
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
30
|
-
import { ChatScreenPeoplePane } from './ChatScreenPeoplePane';
|
31
23
|
import { toFlatCommunicationIdentifier } from "../../../../acs-ui-common/src";
|
32
|
-
/* @conditional-compile-remove(file-sharing) */
|
33
|
-
import { fileUploadsSelector } from './selectors/fileUploadsSelector';
|
34
|
-
/* @conditional-compile-remove(file-sharing) */
|
35
|
-
import { useSelector } from './hooks/useSelector';
|
36
|
-
/* @conditional-compile-remove(file-sharing) */
|
37
|
-
import { FileDownloadErrorBar } from './FileDownloadErrorBar';
|
38
|
-
/* @conditional-compile-remove(file-sharing) */
|
39
|
-
import { _FileDownloadCards } from "../../../../react-components/src";
|
40
|
-
/* @conditional-compile-remove(image-gallery) */
|
41
|
-
import { ImageGallery } from "../../../../react-components/src";
|
42
24
|
/**
|
43
25
|
* @private
|
44
26
|
*/
|
45
27
|
export const ChatScreen = (props) => {
|
46
28
|
const { onFetchAvatarPersonaData, onRenderMessage, onRenderTypingIndicator, options, styles, fileSharing, formFactor } = props;
|
47
29
|
const defaultNumberOfChatMessagesToReload = 5;
|
48
|
-
/* @conditional-compile-remove(file-sharing) */
|
49
|
-
const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');
|
50
|
-
/* @conditional-compile-remove(image-gallery) */
|
51
|
-
const [fullSizeAttachments, setFullSizeAttachments] = useState({});
|
52
|
-
/* @conditional-compile-remove(image-gallery) */
|
53
|
-
const [galleryImages, setGalleryImages] = useState([]);
|
54
|
-
/* @conditional-compile-remove(image-gallery) */
|
55
|
-
const [isImageGalleryOpen, setIsImageGalleryOpen] = useState(false);
|
56
30
|
const adapter = useAdapter();
|
57
31
|
const theme = useTheme();
|
58
32
|
useEffect(() => {
|
@@ -87,96 +61,7 @@ export const ChatScreen = (props) => {
|
|
87
61
|
if (!files) {
|
88
62
|
return;
|
89
63
|
}
|
90
|
-
/* @conditional-compile-remove(file-sharing) */
|
91
|
-
const fileUploads = adapter.registerActiveFileUploads(Array.from(files));
|
92
|
-
/* @conditional-compile-remove(file-sharing) */
|
93
|
-
fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.uploadHandler(userId, fileUploads);
|
94
64
|
}, [adapter, fileSharing, userId]);
|
95
|
-
/* @conditional-compile-remove(file-sharing) */
|
96
|
-
const onRenderFileDownloads = useCallback((userId, message) => React.createElement(_FileDownloadCards, { userId: userId, fileMetadata: message.files || [], downloadHandler: fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler, onDownloadErrorMessage: (errorMessage) => {
|
97
|
-
setDownloadErrorMessage(errorMessage);
|
98
|
-
} }), [fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.downloadHandler]);
|
99
|
-
/* @conditional-compile-remove(image-gallery) */
|
100
|
-
const onInlineImageClicked = useCallback((attachmentId, messageId) => __awaiter(void 0, void 0, void 0, function* () {
|
101
|
-
var _a, _b;
|
102
|
-
const messages = (_a = messageThreadProps.messages) === null || _a === void 0 ? void 0 : _a.filter(message => {
|
103
|
-
return message.messageId === messageId;
|
104
|
-
});
|
105
|
-
if (!messages || messages.length <= 0) {
|
106
|
-
return;
|
107
|
-
}
|
108
|
-
const chatMessage = messages[0];
|
109
|
-
const inlinedImages = (_b = chatMessage.inlineImages) === null || _b === void 0 ? void 0 : _b.filter(attachment => {
|
110
|
-
return attachment.id === attachmentId;
|
111
|
-
});
|
112
|
-
if (!inlinedImages || inlinedImages.length <= 0) {
|
113
|
-
return;
|
114
|
-
}
|
115
|
-
const attachment = inlinedImages[0];
|
116
|
-
const titleIconRenderOptions = {
|
117
|
-
text: chatMessage.senderDisplayName,
|
118
|
-
size: PersonaSize.size32,
|
119
|
-
showOverflowTooltip: false,
|
120
|
-
imageAlt: chatMessage.senderDisplayName
|
121
|
-
};
|
122
|
-
const titleIcon = onRenderAvatarCallback && onRenderAvatarCallback(chatMessage.senderId, titleIconRenderOptions);
|
123
|
-
const galleryImage = {
|
124
|
-
title: chatMessage.senderDisplayName || '',
|
125
|
-
titleIcon: titleIcon,
|
126
|
-
downloadFilename: attachment.id,
|
127
|
-
imageUrl: ''
|
128
|
-
};
|
129
|
-
setIsImageGalleryOpen(true);
|
130
|
-
if (attachment.id in fullSizeAttachments) {
|
131
|
-
setGalleryImages([Object.assign(Object.assign({}, galleryImage), { imageUrl: fullSizeAttachments[attachment.id] })]);
|
132
|
-
return;
|
133
|
-
}
|
134
|
-
if (attachment.attachmentType === 'inlineImage' && attachment.url) {
|
135
|
-
// TBD: Need to begin investigating how to download HQ images.
|
136
|
-
const blob = yield adapter.downloadAttachments({
|
137
|
-
attachmentUrls: {
|
138
|
-
[attachment.id]: attachment.url
|
139
|
-
}
|
140
|
-
});
|
141
|
-
if (blob[0]) {
|
142
|
-
const blobUrl = blob[0].blobUrl;
|
143
|
-
setFullSizeAttachments(prev => (Object.assign(Object.assign({}, prev), { [attachment.id]: blobUrl })));
|
144
|
-
setGalleryImages([Object.assign(Object.assign({}, galleryImage), { imageUrl: blobUrl })]);
|
145
|
-
}
|
146
|
-
}
|
147
|
-
}), [adapter, fullSizeAttachments, messageThreadProps.messages, onRenderAvatarCallback]);
|
148
|
-
/* @conditional-compile-remove(image-gallery) */
|
149
|
-
const inlineImageOptions = {
|
150
|
-
onRenderInlineImage: (inlineImage, defaultOnRender) => {
|
151
|
-
return React.createElement("span", { onClick: () => onInlineImageClicked(inlineImage.imgAttrs.id || '', inlineImage.messageId), tabIndex: 0, role: "button", onKeyDown: e => {
|
152
|
-
if (e.key === 'Enter') {
|
153
|
-
onInlineImageClicked(inlineImage.imgAttrs.id || '', inlineImage.messageId);
|
154
|
-
}
|
155
|
-
} }, defaultOnRender(inlineImage));
|
156
|
-
}
|
157
|
-
};
|
158
|
-
/* @conditional-compile-remove(image-gallery) */
|
159
|
-
const onImageDownloadButtonClicked = useCallback((imageUrl, downloadFilename) => {
|
160
|
-
if (imageUrl === '') {
|
161
|
-
return;
|
162
|
-
}
|
163
|
-
if (isIOS()) {
|
164
|
-
window.open(imageUrl, '_blank');
|
165
|
-
}
|
166
|
-
else {
|
167
|
-
// Create a new anchor element
|
168
|
-
const a = document.createElement('a');
|
169
|
-
// Set the href and download attributes for the anchor element
|
170
|
-
a.href = imageUrl;
|
171
|
-
a.download = downloadFilename;
|
172
|
-
a.rel = 'noopener noreferrer';
|
173
|
-
a.target = '_blank';
|
174
|
-
// Programmatically click the anchor element to trigger the download
|
175
|
-
document.body.appendChild(a);
|
176
|
-
a.click();
|
177
|
-
document.body.removeChild(a);
|
178
|
-
}
|
179
|
-
}, []);
|
180
65
|
const AttachFileButton = useCallback(() => {
|
181
66
|
if (!(fileSharing === null || fileSharing === void 0 ? void 0 : fileSharing.uploadHandler)) {
|
182
67
|
return null;
|
@@ -187,27 +72,15 @@ export const ChatScreen = (props) => {
|
|
187
72
|
(options === null || options === void 0 ? void 0 : options.topic) !== false && React.createElement(ChatHeader, Object.assign({}, headerProps)),
|
188
73
|
React.createElement(Stack, { className: chatArea, tokens: participantListContainerPadding, horizontal: true, grow: true },
|
189
74
|
React.createElement(Stack, { className: chatWrapper, grow: true },
|
190
|
-
(options === null || options === void 0 ? void 0 : options.errorBar) !== false && React.createElement(ErrorBar, Object.assign({}, errorBarProps)),
|
191
|
-
React.createElement(
|
192
|
-
setDownloadErrorMessage('');
|
193
|
-
}, []), fileDownloadErrorMessage: downloadErrorMessage || '' }),
|
194
|
-
React.createElement(MessageThread, Object.assign({}, messageThreadProps, { onRenderAvatar: onRenderAvatarCallback, onRenderMessage: onRenderMessage,
|
195
|
-
/* @conditional-compile-remove(file-sharing) */ onRenderFileDownloads: onRenderFileDownloads,
|
196
|
-
/* @conditional-compile-remove(image-gallery) */ inlineImageOptions: inlineImageOptions, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles })),
|
75
|
+
(options === null || options === void 0 ? void 0 : options.errorBar) !== false && React.createElement(ErrorBar, Object.assign({}, errorBarProps)),
|
76
|
+
React.createElement(MessageThread, Object.assign({}, messageThreadProps, { onRenderAvatar: onRenderAvatarCallback, onRenderMessage: onRenderMessage, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles })),
|
197
77
|
React.createElement(Stack, { className: mergeStyles(sendboxContainerStyles) },
|
198
78
|
React.createElement("div", { className: mergeStyles(typingIndicatorContainerStyles) }, onRenderTypingIndicator ? onRenderTypingIndicator(typingIndicatorProps.typingUsers) : React.createElement(TypingIndicator, Object.assign({}, typingIndicatorProps, { styles: typingIndicatorStyles }))),
|
199
79
|
React.createElement(Stack, { horizontal: formFactor === 'mobile' },
|
200
80
|
formFactor === 'mobile' && React.createElement(Stack, { verticalAlign: "center" },
|
201
81
|
React.createElement(AttachFileButton, null)),
|
202
82
|
React.createElement(Stack, { grow: true },
|
203
|
-
React.createElement(SendBox, Object.assign({}, sendBoxProps, { autoFocus: options === null || options === void 0 ? void 0 : options.autoFocus, styles: sendBoxStyles,
|
204
|
-
|
205
|
-
/* @conditional-compile-remove(file-sharing) */ onCancelFileUpload: adapter.cancelFileUpload }))),
|
206
|
-
formFactor !== 'mobile' && React.createElement(AttachFileButton, null)))), /* @conditional-compile-remove(chat-composite-participant-pane) */
|
207
|
-
(options === null || options === void 0 ? void 0 : options.participantPane) === true && React.createElement(ChatScreenPeoplePane, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, isMobile: formFactor === 'mobile' })), /* @conditional-compile-remove(image-gallery) */
|
208
|
-
React.createElement(ImageGallery, { isOpen: isImageGalleryOpen, images: galleryImages, onDismiss: () => {
|
209
|
-
setGalleryImages([]);
|
210
|
-
setIsImageGalleryOpen(false);
|
211
|
-
}, onImageDownloadButtonClicked: onImageDownloadButtonClicked }));
|
83
|
+
React.createElement(SendBox, Object.assign({}, sendBoxProps, { autoFocus: options === null || options === void 0 ? void 0 : options.autoFocus, styles: sendBoxStyles }))),
|
84
|
+
formFactor !== 'mobile' && React.createElement(AttachFileButton, null))))));
|
212
85
|
};
|
213
86
|
//# sourceMappingURL=ChatScreen.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatScreen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C,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,oBAAC,eAAe,oBAAK,oBAAoB,IAAE,MAAM,EAAE,qBAAqB,IAAI,CAC/J;oBACN,oBAAC,KAAK,IAAC,UAAU,EAAE,UAAU,KAAK,QAAQ;wBACvC,UAAU,KAAK,QAAQ,IAAI,oBAAC,KAAK,IAAC,aAAa,EAAC,QAAQ;4BACrD,oBAAC,gBAAgB,OAAG,CACd;wBACV,oBAAC,KAAK,IAAC,IAAI;4BACT,oBAAC,OAAO,oBAAK,YAAY,IAAE,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,EAAE,MAAM,EAAE,aAAa;gCACjF,+CAA+C,CAAC,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC,KAAK;gCACzG,+CAA+C,CAAC,kBAAkB,EAAE,OAAO,CAAC,gBAAgB,IAAI,CACxF;wBACP,UAAU,KAAK,QAAQ,IAAI,oBAAC,gBAAgB,OAAG,CAC1C,CACF,CACF,EACP,kEAAkE;YACrE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,MAAK,IAAI,IAAI,oBAAC,oBAAoB,IAAC,wBAAwB,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,KAAK,CAAC,2BAA2B,EAAE,QAAQ,EAAE,UAAU,KAAK,QAAQ,GAAI,CAC5M,EACP,gDAAgD;QACnD,oBAAC,YAAY,IAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,EAAE;gBAC/E,gBAAgB,CAAC,EAAE,CAAC,CAAC;gBACrB,qBAAqB,CAAC,KAAK,CAAC,CAAC;YAC/B,CAAC,EAAE,4BAA4B,EAAE,4BAA4B,GAAI,CACzD,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(image-gallery) */\nimport { isIOS } from '@fluentui/react';\nimport { mergeStyles, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(image-gallery) */\nimport { PersonaSize } from '@fluentui/react';\nimport { CommunicationParticipant, ErrorBar, MessageProps, MessageRenderer, MessageThread, MessageThreadStyles, ParticipantMenuItemsCallback, SendBox, SendBoxStylesProps, TypingIndicator, TypingIndicatorStylesProps, useTheme } from '@internal/react-components';\n/* @conditional-compile-remove(image-gallery) */ /* @conditional-compile-remove(file-sharing) */\nimport { ChatMessage } from '@internal/react-components';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n/* @conditional-compile-remove(image-gallery) */\nimport { useState } from 'react';\nimport { AvatarPersona, AvatarPersonaDataCallback, AvatarPersonaProps } from '../common/AvatarPersona';\nimport { useAdapter } from './adapter/ChatAdapterProvider';\nimport { ChatCompositeOptions } from './ChatComposite';\nimport { ChatHeader, getHeaderProps } from './ChatHeader';\nimport { FileDownloadHandler } from '@internal/react-components';\nimport { FileUploadButtonWrapper as FileUploadButton, FileUploadHandler } from './file-sharing';\nimport { useAdaptedSelector } from './hooks/useAdaptedSelector';\nimport { usePropsFor } from './hooks/usePropsFor';\nimport { chatArea, chatContainer, chatWrapper, messageThreadChatCompositeStyles, sendboxContainerStyles, typingIndicatorContainerStyles } from './styles/Chat.styles';\nimport { participantListContainerPadding } from '../common/styles/ParticipantContainer.styles';\n/* @conditional-compile-remove(chat-composite-participant-pane) */\nimport { ChatScreenPeoplePane } from './ChatScreenPeoplePane';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing) */\nimport { fileUploadsSelector } from './selectors/fileUploadsSelector';\n/* @conditional-compile-remove(file-sharing) */\nimport { useSelector } from './hooks/useSelector';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileDownloadErrorBar } from './FileDownloadErrorBar';\n/* @conditional-compile-remove(file-sharing) */\nimport { _FileDownloadCards } from '@internal/react-components';\n/* @conditional-compile-remove(image-gallery) */\nimport { ImageGallery, ImageGalleryImageProps } from '@internal/react-components';\n/* @conditional-compile-remove(image-gallery) */\nimport { InlineImage } from '@internal/react-components';\n\n/**\n * @private\n */\nexport type ChatScreenProps = {\n options?: ChatCompositeOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onRenderMessage?: (messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element;\n onRenderTypingIndicator?: (typingUsers: CommunicationParticipant[]) => JSX.Element;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n styles?: ChatScreenStyles;\n hasFocusOnMount?: 'sendBoxTextField';\n fileSharing?: FileSharingOptions;\n formFactor?: 'desktop' | 'mobile';\n};\n\n/**\n * @private\n */\nexport type ChatScreenStyles = {\n messageThread?: MessageThreadStyles;\n sendBox?: SendBoxStylesProps;\n typingIndicator?: TypingIndicatorStylesProps;\n};\n\n/**\n * Properties for configuring the File Sharing feature.\n * @beta\n */\nexport interface FileSharingOptions {\n /**\n * A string containing the comma separated list of accepted file types.\n * Similar to the `accept` attribute of the `<input type=\"file\" />` element.\n * Accepts any type of file if not specified.\n * @beta\n */\n accept?: string;\n /**\n * Allows multiple files to be selected if set to `true`.\n * Similar to the `multiple` attribute of the `<input type=\"file\" />` element.\n * @defaultValue false\n * @beta\n */\n multiple?: boolean;\n /**\n * A function of type {@link FileUploadHandler} for handling file uploads.\n * @beta\n */\n uploadHandler: FileUploadHandler;\n /**\n * A function of type {@link FileDownloadHandler} for handling file downloads.\n * If the function is not specified, the file's `url` will be opened in a new tab to\n * initiate the download.\n */\n downloadHandler?: FileDownloadHandler;\n}\n\n/**\n * @private\n */\nexport const ChatScreen = (props: ChatScreenProps): JSX.Element => {\n const {\n onFetchAvatarPersonaData,\n onRenderMessage,\n onRenderTypingIndicator,\n options,\n styles,\n fileSharing,\n formFactor\n } = props;\n const defaultNumberOfChatMessagesToReload = 5;\n /* @conditional-compile-remove(file-sharing) */\n const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');\n /* @conditional-compile-remove(image-gallery) */\n const [fullSizeAttachments, setFullSizeAttachments] = useState<Record<string, string>>({});\n /* @conditional-compile-remove(image-gallery) */\n const [galleryImages, setGalleryImages] = useState<Array<ImageGalleryImageProps>>([]);\n /* @conditional-compile-remove(image-gallery) */\n const [isImageGalleryOpen, setIsImageGalleryOpen] = useState<boolean>(false);\n const adapter = useAdapter();\n const theme = useTheme();\n useEffect(() => {\n // Initial data should be always fetched by the composite(or external caller) instead of the adapter\n const fetchData: () => Promise<void> = async () => {\n // Fetch initial data for adapter\n await adapter.fetchInitialData();\n // Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.\n await adapter.loadPreviousChatMessages(defaultNumberOfChatMessagesToReload);\n };\n fetchData();\n }, [adapter]);\n const messageThreadProps = usePropsFor(MessageThread);\n const sendBoxProps = usePropsFor(SendBox);\n const typingIndicatorProps = usePropsFor(TypingIndicator);\n const headerProps = useAdaptedSelector(getHeaderProps);\n const errorBarProps = usePropsFor(ErrorBar);\n const onRenderAvatarCallback = useCallback((userId?: string, defaultOptions?: AvatarPersonaProps) => {\n return <AvatarPersona userId={userId} hidePersonaDetails={true} {...defaultOptions} dataProvider={onFetchAvatarPersonaData} />;\n }, [onFetchAvatarPersonaData]);\n const messageThreadStyles = useMemo(() => {\n return Object.assign({}, messageThreadChatCompositeStyles(theme.semanticColors.bodyBackground), styles?.messageThread);\n }, [styles?.messageThread, theme.semanticColors.bodyBackground]);\n const typingIndicatorStyles = useMemo(() => {\n return Object.assign({}, styles?.typingIndicator);\n }, [styles?.typingIndicator]);\n const sendBoxStyles = useMemo(() => {\n return Object.assign({}, styles?.sendBox);\n }, [styles?.sendBox]);\n const userId = toFlatCommunicationIdentifier(adapter.getState().userId);\n const fileUploadButtonOnChange = useCallback((files: FileList | null): void => {\n if (!files) {\n return;\n }\n\n /* @conditional-compile-remove(file-sharing) */\n const fileUploads = adapter.registerActiveFileUploads(Array.from(files));\n /* @conditional-compile-remove(file-sharing) */\n fileSharing?.uploadHandler(userId, fileUploads);\n }, [adapter, fileSharing, userId]);\n\n /* @conditional-compile-remove(file-sharing) */\n const onRenderFileDownloads = useCallback((userId: string, message: ChatMessage) => <_FileDownloadCards userId={userId} fileMetadata={message.files || []} downloadHandler={fileSharing?.downloadHandler} onDownloadErrorMessage={(errorMessage: string) => {\n setDownloadErrorMessage(errorMessage);\n }} />, [fileSharing?.downloadHandler]);\n\n /* @conditional-compile-remove(image-gallery) */\n const onInlineImageClicked = useCallback(async (attachmentId: string, messageId: string): Promise<void> => {\n const messages = messageThreadProps.messages?.filter(message => {\n return message.messageId === messageId;\n });\n if (!messages || messages.length <= 0) {\n return;\n }\n const chatMessage = (messages[0] as ChatMessage);\n const inlinedImages = chatMessage.inlineImages?.filter(attachment => {\n return attachment.id === attachmentId;\n });\n if (!inlinedImages || inlinedImages.length <= 0) {\n return;\n }\n const attachment = inlinedImages[0];\n const titleIconRenderOptions = {\n text: chatMessage.senderDisplayName,\n size: PersonaSize.size32,\n showOverflowTooltip: false,\n imageAlt: chatMessage.senderDisplayName\n };\n const titleIcon = onRenderAvatarCallback && onRenderAvatarCallback(chatMessage.senderId, titleIconRenderOptions);\n const galleryImage: ImageGalleryImageProps = {\n title: chatMessage.senderDisplayName || '',\n titleIcon: titleIcon,\n downloadFilename: attachment.id,\n imageUrl: ''\n };\n setIsImageGalleryOpen(true);\n if (attachment.id in fullSizeAttachments) {\n setGalleryImages([{\n ...galleryImage,\n imageUrl: fullSizeAttachments[attachment.id]\n }]);\n return;\n }\n if (attachment.attachmentType === 'inlineImage' && attachment.url) {\n // TBD: Need to begin investigating how to download HQ images.\n const blob = await adapter.downloadAttachments({\n attachmentUrls: {\n [attachment.id]: attachment.url\n }\n });\n if (blob[0]) {\n const blobUrl = blob[0].blobUrl;\n setFullSizeAttachments(prev => ({\n ...prev,\n [attachment.id]: blobUrl\n }));\n setGalleryImages([{\n ...galleryImage,\n imageUrl: blobUrl\n }]);\n }\n }\n }, [adapter, fullSizeAttachments, messageThreadProps.messages, onRenderAvatarCallback]);\n\n /* @conditional-compile-remove(image-gallery) */\n const inlineImageOptions = {\n onRenderInlineImage: (inlineImage: InlineImage, defaultOnRender: (inlineImage: InlineImage) => JSX.Element): JSX.Element => {\n return <span onClick={() => onInlineImageClicked(inlineImage.imgAttrs.id || '', inlineImage.messageId)} tabIndex={0} role=\"button\" onKeyDown={e => {\n if (e.key === 'Enter') {\n onInlineImageClicked(inlineImage.imgAttrs.id || '', inlineImage.messageId);\n }\n }}>\n {defaultOnRender(inlineImage)}\n </span>;\n }\n };\n\n /* @conditional-compile-remove(image-gallery) */\n const onImageDownloadButtonClicked = useCallback((imageUrl: string, downloadFilename: string): void => {\n if (imageUrl === '') {\n return;\n }\n if (isIOS()) {\n window.open(imageUrl, '_blank');\n } else {\n // Create a new anchor element\n const a = document.createElement('a');\n // Set the href and download attributes for the anchor element\n a.href = imageUrl;\n a.download = downloadFilename;\n a.rel = 'noopener noreferrer';\n a.target = '_blank';\n\n // Programmatically click the anchor element to trigger the download\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n }\n }, []);\n const AttachFileButton = useCallback(() => {\n if (!fileSharing?.uploadHandler) {\n return null;\n }\n return <FileUploadButton accept={fileSharing?.accept} multiple={fileSharing?.multiple} onChange={fileUploadButtonOnChange} />;\n }, [fileSharing?.accept, fileSharing?.multiple, fileSharing?.uploadHandler, fileUploadButtonOnChange]);\n return <Stack className={chatContainer} grow>\n {options?.topic !== false && <ChatHeader {...headerProps} />}\n <Stack className={chatArea} tokens={participantListContainerPadding} horizontal grow>\n <Stack className={chatWrapper} grow>\n {options?.errorBar !== false && <ErrorBar {...errorBarProps} />}\n {/* @conditional-compile-remove(file-sharing) */\n <FileDownloadErrorBar onDismissDownloadErrorMessage={useCallback(() => {\n setDownloadErrorMessage('');\n }, [])} fileDownloadErrorMessage={downloadErrorMessage || ''} />}\n <MessageThread {...messageThreadProps} onRenderAvatar={onRenderAvatarCallback} onRenderMessage={onRenderMessage}\n /* @conditional-compile-remove(file-sharing) */ onRenderFileDownloads={onRenderFileDownloads}\n /* @conditional-compile-remove(image-gallery) */ inlineImageOptions={inlineImageOptions} numberOfChatMessagesToReload={defaultNumberOfChatMessagesToReload} styles={messageThreadStyles} />\n <Stack className={mergeStyles(sendboxContainerStyles)}>\n <div className={mergeStyles(typingIndicatorContainerStyles)}>\n {onRenderTypingIndicator ? onRenderTypingIndicator(typingIndicatorProps.typingUsers) : <TypingIndicator {...typingIndicatorProps} styles={typingIndicatorStyles} />}\n </div>\n <Stack horizontal={formFactor === 'mobile'}>\n {formFactor === 'mobile' && <Stack verticalAlign=\"center\">\n <AttachFileButton />\n </Stack>}\n <Stack grow>\n <SendBox {...sendBoxProps} autoFocus={options?.autoFocus} styles={sendBoxStyles}\n /* @conditional-compile-remove(file-sharing) */ activeFileUploads={useSelector(fileUploadsSelector).files}\n /* @conditional-compile-remove(file-sharing) */ onCancelFileUpload={adapter.cancelFileUpload} />\n </Stack>\n {formFactor !== 'mobile' && <AttachFileButton />}\n </Stack>\n </Stack>\n </Stack>\n {/* @conditional-compile-remove(chat-composite-participant-pane) */\n options?.participantPane === true && <ChatScreenPeoplePane onFetchAvatarPersonaData={onFetchAvatarPersonaData} onFetchParticipantMenuItems={props.onFetchParticipantMenuItems} isMobile={formFactor === 'mobile'} />}\n </Stack>\n {/* @conditional-compile-remove(image-gallery) */\n <ImageGallery isOpen={isImageGalleryOpen} images={galleryImages} onDismiss={() => {\n setGalleryImages([]);\n setIsImageGalleryOpen(false);\n }} onImageDownloadButtonClicked={onImageDownloadButtonClicked} />}\n </Stack>;\n};"]}
|
1
|
+
{"version":3,"file":"ChatScreen.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/ChatScreen.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAA4B,QAAQ,EAAiC,aAAa,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,KAAK,IAAC,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,+BAA+B,EAAE,UAAU,QAAC,IAAI;YAClF,oBAAC,KAAK,IAAC,SAAS,EAAE,WAAW,EAAE,IAAI;gBAChC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,MAAK,KAAK,IAAI,oBAAC,QAAQ,oBAAK,aAAa,EAAI;gBAE/D,oBAAC,aAAa,oBAAK,kBAAkB,IAAE,cAAc,EAAE,sBAAsB,EAAE,eAAe,EAAE,eAAe,EAAE,4BAA4B,EAAE,mCAAmC,EAAE,MAAM,EAAE,mBAAmB,IAAI;gBACnN,oBAAC,KAAK,IAAC,SAAS,EAAE,WAAW,CAAC,sBAAsB,CAAC;oBACnD,6BAAK,SAAS,EAAE,WAAW,CAAC,8BAA8B,CAAC,IACxD,uBAAuB,CAAC,CAAC,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,oBAAC,eAAe,oBAAK,oBAAoB,IAAE,MAAM,EAAE,qBAAqB,IAAI,CAC/J;oBACN,oBAAC,KAAK,IAAC,UAAU,EAAE,UAAU,KAAK,QAAQ;wBACvC,UAAU,KAAK,QAAQ,IAAI,oBAAC,KAAK,IAAC,aAAa,EAAC,QAAQ;4BACrD,oBAAC,gBAAgB,OAAG,CACd;wBACV,oBAAC,KAAK,IAAC,IAAI;4BACT,oBAAC,OAAO,oBAAK,YAAY,IAAE,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,EAAE,MAAM,EAAE,aAAa,IAAI,CAC7E;wBACP,UAAU,KAAK,QAAQ,IAAI,oBAAC,gBAAgB,OAAG,CAC1C,CACF,CACF,CAEF,CAEF,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { CommunicationParticipant, ErrorBar, MessageProps, MessageRenderer, MessageThread, MessageThreadStyles, ParticipantMenuItemsCallback, SendBox, SendBoxStylesProps, TypingIndicator, TypingIndicatorStylesProps, useTheme } from '@internal/react-components';\nimport React, { useCallback, useEffect, useMemo } from 'react';\nimport { AvatarPersona, AvatarPersonaDataCallback, AvatarPersonaProps } from '../common/AvatarPersona';\nimport { useAdapter } from './adapter/ChatAdapterProvider';\nimport { ChatCompositeOptions } from './ChatComposite';\nimport { ChatHeader, getHeaderProps } from './ChatHeader';\nimport { FileDownloadHandler } from '@internal/react-components';\nimport { FileUploadButtonWrapper as FileUploadButton, FileUploadHandler } from './file-sharing';\nimport { useAdaptedSelector } from './hooks/useAdaptedSelector';\nimport { usePropsFor } from './hooks/usePropsFor';\nimport { chatArea, chatContainer, chatWrapper, messageThreadChatCompositeStyles, sendboxContainerStyles, typingIndicatorContainerStyles } from './styles/Chat.styles';\nimport { participantListContainerPadding } from '../common/styles/ParticipantContainer.styles';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n/**\n * @private\n */\nexport type ChatScreenProps = {\n options?: ChatCompositeOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onRenderMessage?: (messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element;\n onRenderTypingIndicator?: (typingUsers: CommunicationParticipant[]) => JSX.Element;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n styles?: ChatScreenStyles;\n hasFocusOnMount?: 'sendBoxTextField';\n fileSharing?: FileSharingOptions;\n formFactor?: 'desktop' | 'mobile';\n};\n\n/**\n * @private\n */\nexport type ChatScreenStyles = {\n messageThread?: MessageThreadStyles;\n sendBox?: SendBoxStylesProps;\n typingIndicator?: TypingIndicatorStylesProps;\n};\n\n/**\n * Properties for configuring the File Sharing feature.\n * @beta\n */\nexport interface FileSharingOptions {\n /**\n * A string containing the comma separated list of accepted file types.\n * Similar to the `accept` attribute of the `<input type=\"file\" />` element.\n * Accepts any type of file if not specified.\n * @beta\n */\n accept?: string;\n /**\n * Allows multiple files to be selected if set to `true`.\n * Similar to the `multiple` attribute of the `<input type=\"file\" />` element.\n * @defaultValue false\n * @beta\n */\n multiple?: boolean;\n /**\n * A function of type {@link FileUploadHandler} for handling file uploads.\n * @beta\n */\n uploadHandler: FileUploadHandler;\n /**\n * A function of type {@link FileDownloadHandler} for handling file downloads.\n * If the function is not specified, the file's `url` will be opened in a new tab to\n * initiate the download.\n */\n downloadHandler?: FileDownloadHandler;\n}\n\n/**\n * @private\n */\nexport const ChatScreen = (props: ChatScreenProps): JSX.Element => {\n const {\n onFetchAvatarPersonaData,\n onRenderMessage,\n onRenderTypingIndicator,\n options,\n styles,\n fileSharing,\n formFactor\n } = props;\n const defaultNumberOfChatMessagesToReload = 5;\n const adapter = useAdapter();\n const theme = useTheme();\n useEffect(() => {\n // Initial data should be always fetched by the composite(or external caller) instead of the adapter\n const fetchData: () => Promise<void> = async () => {\n // Fetch initial data for adapter\n await adapter.fetchInitialData();\n // Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.\n await adapter.loadPreviousChatMessages(defaultNumberOfChatMessagesToReload);\n };\n fetchData();\n }, [adapter]);\n const messageThreadProps = usePropsFor(MessageThread);\n const sendBoxProps = usePropsFor(SendBox);\n const typingIndicatorProps = usePropsFor(TypingIndicator);\n const headerProps = useAdaptedSelector(getHeaderProps);\n const errorBarProps = usePropsFor(ErrorBar);\n const onRenderAvatarCallback = useCallback((userId?: string, defaultOptions?: AvatarPersonaProps) => {\n return <AvatarPersona userId={userId} hidePersonaDetails={true} {...defaultOptions} dataProvider={onFetchAvatarPersonaData} />;\n }, [onFetchAvatarPersonaData]);\n const messageThreadStyles = useMemo(() => {\n return Object.assign({}, messageThreadChatCompositeStyles(theme.semanticColors.bodyBackground), styles?.messageThread);\n }, [styles?.messageThread, theme.semanticColors.bodyBackground]);\n const typingIndicatorStyles = useMemo(() => {\n return Object.assign({}, styles?.typingIndicator);\n }, [styles?.typingIndicator]);\n const sendBoxStyles = useMemo(() => {\n return Object.assign({}, styles?.sendBox);\n }, [styles?.sendBox]);\n const userId = toFlatCommunicationIdentifier(adapter.getState().userId);\n const fileUploadButtonOnChange = useCallback((files: FileList | null): void => {\n if (!files) {\n return;\n }\n }, [adapter, fileSharing, userId]);\n const AttachFileButton = useCallback(() => {\n if (!fileSharing?.uploadHandler) {\n return null;\n }\n return <FileUploadButton accept={fileSharing?.accept} multiple={fileSharing?.multiple} onChange={fileUploadButtonOnChange} />;\n }, [fileSharing?.accept, fileSharing?.multiple, fileSharing?.uploadHandler, fileUploadButtonOnChange]);\n return <Stack className={chatContainer} grow>\n {options?.topic !== false && <ChatHeader {...headerProps} />}\n <Stack className={chatArea} tokens={participantListContainerPadding} horizontal grow>\n <Stack className={chatWrapper} grow>\n {options?.errorBar !== false && <ErrorBar {...errorBarProps} />}\n {}\n <MessageThread {...messageThreadProps} onRenderAvatar={onRenderAvatarCallback} onRenderMessage={onRenderMessage} numberOfChatMessagesToReload={defaultNumberOfChatMessagesToReload} styles={messageThreadStyles} />\n <Stack className={mergeStyles(sendboxContainerStyles)}>\n <div className={mergeStyles(typingIndicatorContainerStyles)}>\n {onRenderTypingIndicator ? onRenderTypingIndicator(typingIndicatorProps.typingUsers) : <TypingIndicator {...typingIndicatorProps} styles={typingIndicatorStyles} />}\n </div>\n <Stack horizontal={formFactor === 'mobile'}>\n {formFactor === 'mobile' && <Stack verticalAlign=\"center\">\n <AttachFileButton />\n </Stack>}\n <Stack grow>\n <SendBox {...sendBoxProps} autoFocus={options?.autoFocus} styles={sendBoxStyles} />\n </Stack>\n {formFactor !== 'mobile' && <AttachFileButton />}\n </Stack>\n </Stack>\n </Stack>\n {}\n </Stack>\n {}\n </Stack>;\n};"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Strings used by the {@link ChatComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface ChatCompositeStrings {\n /**\n * Chat list header text\n */\n chatListHeader: string;\n
|
1
|
+
{"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-composites/src/composites/ChatComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Strings used by the {@link ChatComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface ChatCompositeStrings {\n /**\n * Chat list header text\n */\n chatListHeader: string;\n}"]}
|
@@ -4,9 +4,6 @@ import { CommunicationTokenCredential, CommunicationUserIdentifier } from '@azur
|
|
4
4
|
import { _TelemetryImplementationHint } from "../../../../../acs-ui-common/src";
|
5
5
|
import { ChatAdapter, ChatAdapterState, MessageDeletedListener, MessageEditedListener, MessageReadListener, MessageReceivedListener, ParticipantsAddedListener, ParticipantsRemovedListener, TopicChangedListener } from './ChatAdapter';
|
6
6
|
import { AdapterError } from '../../common/adapters';
|
7
|
-
import { AttachmentDownloadResult } from "../../../../../react-components/src";
|
8
|
-
import { AttachmentMetadata } from "../../../../../react-components/src";
|
9
|
-
import { FileUploadManager } from '../file-sharing';
|
10
7
|
/**
|
11
8
|
* Context of Chat, which is a centralized context for all state updates
|
12
9
|
* @private
|
@@ -30,13 +27,9 @@ export declare class AzureCommunicationChatAdapter implements ChatAdapter {
|
|
30
27
|
private chatClient;
|
31
28
|
private chatThreadClient;
|
32
29
|
private context;
|
33
|
-
private credential?;
|
34
|
-
private fileUploadAdapter;
|
35
30
|
private handlers;
|
36
31
|
private emitter;
|
37
|
-
constructor(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient
|
38
|
-
credential?: CommunicationTokenCredential;
|
39
|
-
});
|
32
|
+
constructor(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient);
|
40
33
|
private bindAllPublicMethods;
|
41
34
|
dispose(): void;
|
42
35
|
fetchInitialData(): Promise<void>;
|
@@ -49,21 +42,8 @@ export declare class AzureCommunicationChatAdapter implements ChatAdapter {
|
|
49
42
|
removeParticipant(userId: string): Promise<void>;
|
50
43
|
setTopic(topicName: string): Promise<void>;
|
51
44
|
loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;
|
52
|
-
updateMessage(messageId: string, content: string, metadata?: Record<string, string>, options?: {
|
53
|
-
attachmentMetadata?: AttachmentMetadata[];
|
54
|
-
}): Promise<void>;
|
45
|
+
updateMessage(messageId: string, content: string, metadata?: Record<string, string>, options?: {}): Promise<void>;
|
55
46
|
deleteMessage(messageId: string): Promise<void>;
|
56
|
-
registerActiveFileUploads(files: File[]): FileUploadManager[];
|
57
|
-
registerCompletedFileUploads(metadata: AttachmentMetadata[]): FileUploadManager[];
|
58
|
-
clearFileUploads(): void;
|
59
|
-
cancelFileUpload(id: string): void;
|
60
|
-
updateFileUploadProgress(id: string, progress: number): void;
|
61
|
-
updateFileUploadErrorMessage(id: string, errorMessage: string): void;
|
62
|
-
updateFileUploadMetadata(id: string, metadata: AttachmentMetadata): void;
|
63
|
-
downloadAttachments(options: {
|
64
|
-
attachmentUrls: Record<string, string>;
|
65
|
-
}): Promise<AttachmentDownloadResult[]>;
|
66
|
-
private downloadAuthenticatedFile;
|
67
47
|
private messageReceivedListener;
|
68
48
|
private messageEditedListener;
|
69
49
|
private messageDeletedListener;
|
@@ -93,13 +73,6 @@ export declare class AzureCommunicationChatAdapter implements ChatAdapter {
|
|
93
73
|
off(event: 'error', listener: (e: AdapterError) => void): void;
|
94
74
|
private asyncTeeErrorToEventEmitter;
|
95
75
|
}
|
96
|
-
/**
|
97
|
-
* Configuration options to include when creating AzureCommunicationChatAdapter.
|
98
|
-
* @beta
|
99
|
-
*/
|
100
|
-
export type AzureCommunicationChatAdapterOptions = {
|
101
|
-
credential?: CommunicationTokenCredential;
|
102
|
-
};
|
103
76
|
/**
|
104
77
|
* Arguments for creating the Azure Communication Services implementation of {@link ChatAdapter}.
|
105
78
|
*
|
@@ -149,7 +122,5 @@ export declare const useAzureCommunicationChatAdapter: (args: Partial<AzureCommu
|
|
149
122
|
*
|
150
123
|
* @public
|
151
124
|
*/
|
152
|
-
export declare function createAzureCommunicationChatAdapterFromClient(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient
|
153
|
-
credential?: CommunicationTokenCredential;
|
154
|
-
}): Promise<ChatAdapter>;
|
125
|
+
export declare function createAzureCommunicationChatAdapterFromClient(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient): Promise<ChatAdapter>;
|
155
126
|
//# sourceMappingURL=AzureCommunicationChatAdapter.d.ts.map
|
@@ -16,14 +16,10 @@ var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
16
16
|
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
17
17
|
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
18
18
|
};
|
19
|
-
import { _createStatefulChatClientInner
|
19
|
+
import { _createStatefulChatClientInner } from "../../../../../chat-stateful-client/src";
|
20
20
|
import { createDefaultChatHandlers } from "../../../../../chat-component-bindings/src";
|
21
21
|
import { toFlatCommunicationIdentifier } from "../../../../../acs-ui-common/src";
|
22
22
|
import EventEmitter from 'events';
|
23
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
24
|
-
import { convertFileUploadsUiStateToMessageMetadata } from './AzureCommunicationFileUploadAdapter';
|
25
|
-
/* @conditional-compile-remove(file-sharing) */
|
26
|
-
import { AzureCommunicationFileUploadAdapter } from './AzureCommunicationFileUploadAdapter';
|
27
23
|
import { useEffect, useRef, useState } from 'react';
|
28
24
|
import { _isValidIdentifier } from "../../../../../acs-ui-common/src";
|
29
25
|
/**
|
@@ -72,8 +68,6 @@ export class ChatContext {
|
|
72
68
|
thread,
|
73
69
|
latestErrors: clientState.latestErrors
|
74
70
|
};
|
75
|
-
/* @conditional-compile-remove(file-sharing) */
|
76
|
-
updatedState = Object.assign(Object.assign({}, updatedState), { fileUploads: this.state.fileUploads });
|
77
71
|
this.setState(updatedState);
|
78
72
|
}
|
79
73
|
}
|
@@ -81,20 +75,12 @@ export class ChatContext {
|
|
81
75
|
* @private
|
82
76
|
*/
|
83
77
|
export class AzureCommunicationChatAdapter {
|
84
|
-
constructor(chatClient, chatThreadClient
|
85
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
86
|
-
this.credential = undefined;
|
78
|
+
constructor(chatClient, chatThreadClient) {
|
87
79
|
this.emitter = new EventEmitter();
|
88
80
|
this.bindAllPublicMethods();
|
89
81
|
this.chatClient = chatClient;
|
90
82
|
this.chatThreadClient = chatThreadClient;
|
91
83
|
this.context = new ChatContext(chatClient.getState(), chatThreadClient.threadId);
|
92
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
93
|
-
if (options && options.credential) {
|
94
|
-
this.credential = options.credential;
|
95
|
-
}
|
96
|
-
/* @conditional-compile-remove(file-sharing) */
|
97
|
-
this.fileUploadAdapter = new AzureCommunicationFileUploadAdapter(this.context);
|
98
84
|
const onStateChange = (clientState) => {
|
99
85
|
// unsubscribe when the instance gets disposed
|
100
86
|
if (!this) {
|
@@ -123,22 +109,6 @@ export class AzureCommunicationChatAdapter {
|
|
123
109
|
this.loadPreviousChatMessages = this.loadPreviousChatMessages.bind(this);
|
124
110
|
this.on = this.on.bind(this);
|
125
111
|
this.off = this.off.bind(this);
|
126
|
-
/* @conditional-compile-remove(file-sharing) */
|
127
|
-
this.registerActiveFileUploads = this.registerActiveFileUploads.bind(this);
|
128
|
-
/* @conditional-compile-remove(file-sharing) */
|
129
|
-
this.registerCompletedFileUploads = this.registerCompletedFileUploads.bind(this);
|
130
|
-
/* @conditional-compile-remove(file-sharing) */
|
131
|
-
this.clearFileUploads = this.clearFileUploads.bind(this);
|
132
|
-
/* @conditional-compile-remove(file-sharing) */
|
133
|
-
this.cancelFileUpload = this.cancelFileUpload.bind(this);
|
134
|
-
/* @conditional-compile-remove(file-sharing) */
|
135
|
-
this.updateFileUploadProgress = this.updateFileUploadProgress.bind(this);
|
136
|
-
/* @conditional-compile-remove(file-sharing) */
|
137
|
-
this.updateFileUploadErrorMessage = this.updateFileUploadErrorMessage.bind(this);
|
138
|
-
/* @conditional-compile-remove(file-sharing) */
|
139
|
-
this.updateFileUploadMetadata = this.updateFileUploadMetadata.bind(this);
|
140
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
141
|
-
this.downloadAttachments = this.downloadAttachments.bind(this);
|
142
112
|
}
|
143
113
|
dispose() {
|
144
114
|
this.unsubscribeAllEvents();
|
@@ -184,17 +154,6 @@ export class AzureCommunicationChatAdapter {
|
|
184
154
|
sendMessage(content, options = {}) {
|
185
155
|
return __awaiter(this, void 0, void 0, function* () {
|
186
156
|
yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
187
|
-
/* @conditional-compile-remove(file-sharing) */
|
188
|
-
options.metadata = Object.assign(Object.assign({}, options.metadata), convertFileUploadsUiStateToMessageMetadata(this.context.getState().fileUploads));
|
189
|
-
/* @conditional-compile-remove(file-sharing) */
|
190
|
-
/**
|
191
|
-
* All the current uploads need to be clear from the state before a message has been sent.
|
192
|
-
* This ensures the following behavior:
|
193
|
-
* 1. File Upload cards are removed from sendbox at the same time text in sendbox is removed.
|
194
|
-
* 2. any component rendering these file uploads doesn't continue to do so.
|
195
|
-
* 3. Cleans the state for new file uploads with a fresh message.
|
196
|
-
*/
|
197
|
-
this.fileUploadAdapter.clearFileUploads();
|
198
157
|
yield this.handlers.onSendMessage(content, options);
|
199
158
|
}));
|
200
159
|
});
|
@@ -237,13 +196,6 @@ export class AzureCommunicationChatAdapter {
|
|
237
196
|
updateMessage(messageId, content, metadata, options) {
|
238
197
|
return __awaiter(this, void 0, void 0, function* () {
|
239
198
|
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
240
|
-
/* @conditional-compile-remove(file-sharing) */
|
241
|
-
const updatedOptions = options ? {
|
242
|
-
attachmentMetadata: options.attachmentMetadata,
|
243
|
-
metadata: metadata
|
244
|
-
} : {};
|
245
|
-
/* @conditional-compile-remove(file-sharing) */
|
246
|
-
return yield this.handlers.onUpdateMessage(messageId, content, updatedOptions);
|
247
199
|
return yield this.handlers.onUpdateMessage(messageId, content);
|
248
200
|
}));
|
249
201
|
});
|
@@ -255,78 +207,6 @@ export class AzureCommunicationChatAdapter {
|
|
255
207
|
}));
|
256
208
|
});
|
257
209
|
}
|
258
|
-
/* @conditional-compile-remove(file-sharing) */
|
259
|
-
registerActiveFileUploads(files) {
|
260
|
-
return this.fileUploadAdapter.registerActiveFileUploads(files);
|
261
|
-
}
|
262
|
-
/* @conditional-compile-remove(file-sharing) */
|
263
|
-
registerCompletedFileUploads(metadata) {
|
264
|
-
return this.fileUploadAdapter.registerCompletedFileUploads(metadata);
|
265
|
-
}
|
266
|
-
/* @conditional-compile-remove(file-sharing) */
|
267
|
-
clearFileUploads() {
|
268
|
-
this.fileUploadAdapter.clearFileUploads();
|
269
|
-
}
|
270
|
-
/* @conditional-compile-remove(file-sharing) */
|
271
|
-
cancelFileUpload(id) {
|
272
|
-
this.fileUploadAdapter.cancelFileUpload(id);
|
273
|
-
}
|
274
|
-
/* @conditional-compile-remove(file-sharing) */
|
275
|
-
updateFileUploadProgress(id, progress) {
|
276
|
-
this.fileUploadAdapter.updateFileUploadProgress(id, progress);
|
277
|
-
}
|
278
|
-
/* @conditional-compile-remove(file-sharing) */
|
279
|
-
updateFileUploadErrorMessage(id, errorMessage) {
|
280
|
-
this.fileUploadAdapter.updateFileUploadErrorMessage(id, errorMessage);
|
281
|
-
}
|
282
|
-
/* @conditional-compile-remove(file-sharing) */
|
283
|
-
updateFileUploadMetadata(id, metadata) {
|
284
|
-
this.fileUploadAdapter.updateFileUploadMetadata(id, metadata);
|
285
|
-
}
|
286
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
287
|
-
downloadAttachments(options) {
|
288
|
-
return __awaiter(this, void 0, void 0, function* () {
|
289
|
-
return this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
290
|
-
if (this.credential === undefined) {
|
291
|
-
throw new ChatError('ChatThreadClient.getMessage', new Error('AccessToken is null'));
|
292
|
-
}
|
293
|
-
const accessToken = yield this.credential.getToken();
|
294
|
-
if (!accessToken) {
|
295
|
-
throw new ChatError('ChatThreadClient.getMessage', new Error('AccessToken is null'));
|
296
|
-
}
|
297
|
-
return this.downloadAuthenticatedFile(accessToken.token, options);
|
298
|
-
}));
|
299
|
-
});
|
300
|
-
}
|
301
|
-
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
302
|
-
downloadAuthenticatedFile(accessToken, options) {
|
303
|
-
return __awaiter(this, void 0, void 0, function* () {
|
304
|
-
function fetchWithAuthentication(url, token) {
|
305
|
-
return __awaiter(this, void 0, void 0, function* () {
|
306
|
-
const headers = new Headers();
|
307
|
-
headers.append('Authorization', `Bearer ${token}`);
|
308
|
-
try {
|
309
|
-
return yield fetch(url, {
|
310
|
-
headers
|
311
|
-
});
|
312
|
-
}
|
313
|
-
catch (err) {
|
314
|
-
throw new ChatError('ChatThreadClient.getMessage', err);
|
315
|
-
}
|
316
|
-
});
|
317
|
-
}
|
318
|
-
const attachmentDownloadResults = [];
|
319
|
-
for (const id in options.attachmentUrls) {
|
320
|
-
const response = yield fetchWithAuthentication(options.attachmentUrls[id], accessToken);
|
321
|
-
const blob = yield response.blob();
|
322
|
-
attachmentDownloadResults.push({
|
323
|
-
attachmentId: id,
|
324
|
-
blobUrl: URL.createObjectURL(blob)
|
325
|
-
});
|
326
|
-
}
|
327
|
-
return attachmentDownloadResults;
|
328
|
-
});
|
329
|
-
}
|
330
210
|
messageReceivedListener(event) {
|
331
211
|
const isCurrentChatAdapterThread = event.threadId === this.chatThreadClient.threadId;
|
332
212
|
if (!isCurrentChatAdapterThread) {
|
@@ -490,11 +370,7 @@ export const _createAzureCommunicationChatAdapterInner = (endpoint, userId, disp
|
|
490
370
|
}, undefined, telemetryImplementationHint);
|
491
371
|
const chatThreadClient = yield chatClient.getChatThreadClient(threadId);
|
492
372
|
yield chatClient.startRealtimeNotifications();
|
493
|
-
|
494
|
-
const options = {
|
495
|
-
credential: credential
|
496
|
-
};
|
497
|
-
const adapter = yield createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient, /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ options);
|
373
|
+
const adapter = yield createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient);
|
498
374
|
return adapter;
|
499
375
|
});
|
500
376
|
/**
|
@@ -582,9 +458,9 @@ export const useAzureCommunicationChatAdapter = (args, afterCreate, beforeDispos
|
|
582
458
|
*
|
583
459
|
* @public
|
584
460
|
*/
|
585
|
-
export function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient
|
461
|
+
export function createAzureCommunicationChatAdapterFromClient(chatClient, chatThreadClient) {
|
586
462
|
return __awaiter(this, void 0, void 0, function* () {
|
587
|
-
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient
|
463
|
+
return new AzureCommunicationChatAdapter(chatClient, chatThreadClient);
|
588
464
|
});
|
589
465
|
}
|
590
466
|
const isChatError = (e) => {
|