@azure/communication-react 1.9.0 → 1.10.0-beta.1
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 +2403 -189
- package/dist/dist-cjs/communication-react/index.js +14191 -7849
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +2 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +12 -0
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +13 -1
- package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +4 -0
- 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 +13 -3
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +18 -2
- 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 +10 -0
- 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 +15 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +45 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +91 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -0
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +4 -1
- package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +19 -0
- 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 +6 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js +8 -0
- package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.d.ts +1 -0
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +16 -3
- 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 +4 -3
- 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 +14 -2
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +20 -1
- 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 +7 -0
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +12 -0
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +4 -0
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +11 -0
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +2 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +8 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +8 -2
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.d.ts +6 -5
- package/dist/dist-esm/calling-stateful-client/src/BetaToStableTypes.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.d.ts +15 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarative.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.d.ts +2 -1
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js +5 -0
- package/dist/dist-esm/calling-stateful-client/src/CallAgentDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +60 -3
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +8 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +62 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +41 -0
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +8 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +12 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js +8 -0
- package/dist/dist-esm/calling-stateful-client/src/ParticipantSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js +8 -0
- package/dist/dist-esm/calling-stateful-client/src/RemoteVideoStreamSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +25 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +33 -2
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.d.ts +19 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js +91 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallAgentDeclarative.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.d.ts +23 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +49 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +8 -0
- package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +3 -0
- 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 +4 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +119 -6
- 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/EventSubscriber.js +3 -1
- package/dist/dist-esm/chat-stateful-client/src/EventSubscriber.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js +4 -1
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.d.ts +1 -0
- package/dist/dist-esm/chat-stateful-client/src/types/ChatMessageWithStatus.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +27 -0
- package/dist/dist-esm/communication-react/src/index.js +16 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Caption.js +1 -0
- package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +22 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +9 -2
- 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 +2 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +25 -16
- 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 +22 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +49 -15
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +92 -2
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.d.ts +10 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js +15 -0
- package/dist/dist-esm/react-components/src/components/ChatMessage/MentionRenderer.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.d.ts +69 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js +43 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDenied.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.d.ts +75 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js +75 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/BrowserPermissionDeniedIOS.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.d.ts +105 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js +68 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissions.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.d.ts +86 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +39 -0
- package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +6 -0
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js +2 -2
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +20 -19
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +29 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js +24 -2
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/HoldButton.d.ts +49 -0
- package/dist/dist-esm/react-components/src/components/HoldButton.js +25 -0
- package/dist/dist-esm/react-components/src/components/HoldButton.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +71 -0
- package/dist/dist-esm/react-components/src/components/ImageGallery.js +56 -0
- package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.d.ts +3 -5
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +22 -5
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/MentionPopover.d.ts +121 -0
- package/dist/dist-esm/react-components/src/components/MentionPopover.js +117 -0
- package/dist/dist-esm/react-components/src/components/MentionPopover.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +51 -2
- package/dist/dist-esm/react-components/src/components/MessageThread.js +57 -8
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +13 -0
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +3 -0
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/ParticipantList.js +22 -4
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +3 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.d.ts +41 -0
- package/dist/dist-esm/react-components/src/components/SendBox.js +32 -4
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.d.ts +41 -0
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +573 -0
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.d.ts +152 -0
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js +816 -0
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/mentionTagUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +2 -0
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js +2 -0
- package/dist/dist-esm/react-components/src/components/UnsupportedBrowserVersion.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js +24 -0
- package/dist/dist-esm/react-components/src/components/UnsupportedEnvironment.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js +2 -0
- package/dist/dist-esm/react-components/src/components/UnsupportedOperatingSystem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +7 -3
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +25 -15
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js +6 -4
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +8 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +8 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +15 -3
- 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 +13 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +15 -5
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +7 -0
- package/dist/dist-esm/react-components/src/components/VideoTile.js +7 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +19 -0
- package/dist/dist-esm/react-components/src/components/index.js +12 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.d.ts +58 -0
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js +144 -0
- package/dist/dist-esm/react-components/src/components/styles/BrowserPermissionDenied.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +12 -0
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +25 -2
- package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js +2 -2
- package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +68 -0
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +205 -0
- package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.d.ts +0 -4
- package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js +0 -9
- package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.d.ts +26 -0
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js +68 -0
- package/dist/dist-esm/react-components/src/components/styles/MentionPopover.style.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.d.ts +38 -0
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js +92 -0
- package/dist/dist-esm/react-components/src/components/styles/SitePermissions.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.d.ts +26 -0
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js +67 -0
- package/dist/dist-esm/react-components/src/components/styles/UnsupportedEnvironment.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils/common.js +4 -0
- 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 +2 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/merge.d.ts +7 -0
- package/dist/dist-esm/react-components/src/components/utils/merge.js +16 -0
- package/dist/dist-esm/react-components/src/components/utils/merge.js.map +1 -0
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.d.ts +4 -0
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js +5 -1
- package/dist/dist-esm/react-components/src/identifiers/IdentifierProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +1 -0
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +63 -0
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +87 -72
- package/dist/dist-esm/react-components/src/theming/icons.js +108 -0
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.styles.d.ts +6 -0
- package/dist/dist-esm/react-components/src/theming/icons.styles.js +25 -0
- package/dist/dist-esm/react-components/src/theming/icons.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/theming/themes.d.ts +21 -2
- package/dist/dist-esm/react-components/src/theming/themes.js +16 -0
- package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +27 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/OnRender.d.ts +8 -0
- package/dist/dist-esm/react-components/src/types/OnRender.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +6 -0
- package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js +2 -0
- 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 +78 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +87 -7
- 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 +144 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +75 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +317 -50
- 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 +130 -1
- 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 +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/createHandlers.js +7 -1
- 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 +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +67 -10
- 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 +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +121 -12
- 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/CallReadinessModal.d.ts +48 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +218 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageCameraDropdown.js +27 -0
- 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.js +20 -2
- 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 +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ConfigurationPageMicDropdown.js +27 -0
- 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/HoldPane.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +93 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +33 -6
- 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/MediaGallery.d.ts +0 -9
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +21 -37
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js +0 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/NetworkReconnectTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Camera.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js +36 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Devices.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Microphone.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js +26 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/People.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js +8 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/ScreenShare.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useAdaptedSelector.js +6 -2
- 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 +23 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +2 -0
- 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 +1 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +6 -3
- 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 +7 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +97 -6
- 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 +24 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +28 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +2 -2
- 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/TransferPage.d.ts +11 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js +113 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/TransferPage.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.d.ts +15 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js +54 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/UnsupportedBrowser.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +10 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +10 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.d.ts +32 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +81 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.d.ts +37 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js +73 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/TransferPage.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +1 -80
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +15 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +88 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +68 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +35 -5
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +32 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +30 -5
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +111 -4
- 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 +64 -0
- 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 +10 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +40 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +13 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +37 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +24 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +11 -1
- 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 +20 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +133 -5
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.d.ts +18 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js +18 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreenPeoplePane.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.d.ts +15 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js +23 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/FileDownloadErrorBar.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/Strings.d.ts +4 -0
- 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 +28 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +126 -4
- 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 +28 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.js +159 -1
- 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 +17 -2
- 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 +2 -0
- 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.js +8 -1
- 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/useSelector.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js +11 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useSelector.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js +15 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/baseSelectors.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +34 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js +14 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +5 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +11 -0
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +22 -0
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +107 -0
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js +32 -0
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js +3 -2
- package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +22 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js +74 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.d.ts +15 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +61 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +8 -2
- package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +14 -6
- 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/CustomButton.d.ts +84 -23
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +13 -5
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +70 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +65 -3
- 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 +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +20 -3
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.d.ts +1 -2
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/common/ParticipantContainer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +21 -2
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.d.ts +17 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js +50 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.d.ts +11 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +40 -0
- package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +103 -73
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +18 -2
- 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 +21 -83
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +6 -74
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +0 -32
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../preprocess-dist/communication-react/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAYzG,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAIrN,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,aAAa,EAAE,mBAAmB,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAEjL,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACz1B,6CAA6C;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAQ7D,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type { AreEqual, CommonProperties, MessageStatus, Common, AreTypeEqual, AreParamEqual } from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type { CallClientProviderProps, CallAgentProviderProps, CallProviderProps, GetCallingSelector, CallingHandlers, CallingBaseSelectorProps, CommonCallingHandlers } from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(close-captions) */\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\nexport type { ChatClientProviderProps, ChatThreadClientProviderProps, GetChatSelector, ChatHandlers, ChatBaseSelectorProps } from '../../chat-component-bindings/src';\nexport { CallClientProvider, CallAgentProvider, CallProvider, useCallClient, useCallAgent, useCall, useDeviceManager, getCallingSelector, createDefaultCallingHandlers } from '../../calling-component-bindings/src';\nexport type { ScreenShareButtonSelector, CameraButtonSelector, VideoGallerySelector, DevicesButtonSelector, EmptySelector, ErrorBarSelector as CallErrorBarSelector, ParticipantListSelector, MicrophoneButtonSelector, ParticipantsButtonSelector, CreateDefaultCallingHandlers } from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(raise-hand) */\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\nexport { ChatClientProvider, ChatThreadClientProvider, useChatClient, useChatThreadClient, getChatSelector, createDefaultChatHandlers } from '../../chat-component-bindings/src';\nexport type { MessageThreadSelector, TypingIndicatorSelector, ChatParticipantListSelector, SendBoxSelector, ErrorBarSelector as ChatErrorBarSelector } from '../../chat-component-bindings/src';\nexport { _IdentifierProvider, CameraButton, ControlBar, ControlBarButton, DevicesButton, EndCallButton, ErrorBar, GridLayout, LocalizationProvider, MessageStatusIndicator, MessageThread, MicrophoneButton, ParticipantItem, ParticipantList, ParticipantsButton, ScreenShareButton, SendBox, StreamMedia, TypingIndicator, VideoGallery, VideoTile, COMPONENT_LOCALE_EN_GB, COMPONENT_LOCALE_AR_SA, COMPONENT_LOCALE_CS_CZ, COMPONENT_LOCALE_DE_DE, COMPONENT_LOCALE_ES_ES, COMPONENT_LOCALE_FI_FI, COMPONENT_LOCALE_FR_FR, COMPONENT_LOCALE_HE_IL, COMPONENT_LOCALE_IT_IT, COMPONENT_LOCALE_JA_JP, COMPONENT_LOCALE_KO_KR, COMPONENT_LOCALE_NB_NO, COMPONENT_LOCALE_NL_NL, COMPONENT_LOCALE_PL_PL, COMPONENT_LOCALE_PT_BR, COMPONENT_LOCALE_RU_RU, COMPONENT_LOCALE_SV_SE, COMPONENT_LOCALE_TR_TR, COMPONENT_LOCALE_ZH_CN, COMPONENT_LOCALE_ZH_TW } from '../../react-components/src';\n/* @conditional-compile-remove(raise-hand) */\nexport { RaiseHandButton } from '../../react-components/src';\nexport type { _IdentifierProviderProps, _Identifiers, ActiveErrorMessage, BaseCustomStyles, CallParticipantListParticipant, CameraButtonContextualMenuStyles, CameraButtonProps, CameraButtonStrings, CameraButtonStyles, ChatMessage, CommunicationParticipant, ComponentLocale, ComponentSlotStyle, ComponentStrings, ContentSystemMessage, ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles, ControlBarLayout, ControlBarProps, CreateVideoStreamViewResult, CustomAvatarOptions, CustomMessage, DevicesButtonContextualMenuStyles, DevicesButtonProps, DevicesButtonStrings, DevicesButtonStyles, EndCallButtonProps, EndCallButtonStrings, ErrorBarProps, ErrorBarStrings, ErrorType, GridLayoutProps, GridLayoutStyles, HorizontalGalleryStyles, JumpToNewMessageButtonProps, LocalizationProviderProps, LocalVideoCameraCycleButtonProps, LoadingState, Message, MessageAttachedStatus, MessageCommon, MessageContentType, MessageProps, MessageRenderer, MessageStatusIndicatorProps, MessageStatusIndicatorStrings, MessageThreadProps, MessageThreadStrings, MessageThreadStyles, MicrophoneButtonContextualMenuStyles, MicrophoneButtonProps, MicrophoneButtonStrings, MicrophoneButtonStyles, OnRenderAvatarCallback, OptionsDevice, ParticipantAddedSystemMessage, ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles, ParticipantListItemStyles, ParticipantListParticipant, ParticipantListProps, ParticipantListStyles, ParticipantMenuItemsCallback, ParticipantRemovedSystemMessage, ParticipantState, ParticipantsButtonContextualMenuStyles, ParticipantsButtonProps, ParticipantsButtonStrings, ParticipantsButtonStyles, ReadReceiptsBySenderId, ScreenShareButtonProps, ScreenShareButtonStrings, SendBoxProps, SendBoxStrings, SendBoxStylesProps, StreamMediaProps, SystemMessage, SystemMessageCommon, TopicUpdatedSystemMessage, TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps, UpdateMessageCallback, CancelEditCallback, VideoGalleryLayout, VideoGalleryLocalParticipant, VideoGalleryParticipant, VideoGalleryProps, VideoGalleryRemoteParticipant, VideoGalleryStream, VideoGalleryStrings, VideoGalleryStyles, VideoStreamOptions, VideoTileProps, VideoTileStylesProps, ViewScalingMode } from '../../react-components/src';\n/* @conditional-compile-remove(raise-hand) */\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '../../react-components/src';\n/* @conditional-compile-remove(vertical-gallery) */\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type { StatefulChatClient, StatefulChatClientArgs, StatefulChatClientOptions, ChatMessageWithStatus, ChatClientState, ChatError, ChatErrors, ChatThreadClientState, ChatThreadProperties, ChatErrorTarget } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n/* @conditional-compile-remove(vertical-gallery) */\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from '../../react-components/src';\n/* @conditional-compile-remove(close-captions) */\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../preprocess-dist/communication-react/src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAYzG,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAErN,yDAAyD;AACzD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,iCAAiC,EAAE,MAAM,sCAAsC,CAAC;AAU1H,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,aAAa,EAAE,mBAAmB,EAAE,eAAe,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAEjL,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,aAAa,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,SAAS,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACz1B,gDAAgD;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,6CAA6C;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,0CAA0C,CAAC,6CAA6C;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,iDAAiD;AACjD,OAAO,EAAE,kCAAkC,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAoClI,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAG/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,sDAAsD;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,sDAAsD;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type { AreEqual, CommonProperties, MessageStatus, Common, AreTypeEqual, AreParamEqual } from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type { CallClientProviderProps, CallAgentProviderProps, CallProviderProps, GetCallingSelector, CallingHandlers, CallingBaseSelectorProps, CommonCallingHandlers } from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(close-captions) */\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\nexport type { ChatClientProviderProps, ChatThreadClientProviderProps, GetChatSelector, ChatHandlers, ChatBaseSelectorProps } from '../../chat-component-bindings/src';\nexport { CallClientProvider, CallAgentProvider, CallProvider, useCallClient, useCallAgent, useCall, useDeviceManager, getCallingSelector, createDefaultCallingHandlers } from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport { useTeamsCallAgent, useTeamsCall, createDefaultTeamsCallingHandlers } from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\nexport type { ScreenShareButtonSelector, CameraButtonSelector, VideoGallerySelector, DevicesButtonSelector, EmptySelector, ErrorBarSelector as CallErrorBarSelector, ParticipantListSelector, MicrophoneButtonSelector, ParticipantsButtonSelector, CreateDefaultCallingHandlers } from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(raise-hand) */\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\nexport { ChatClientProvider, ChatThreadClientProvider, useChatClient, useChatThreadClient, getChatSelector, createDefaultChatHandlers } from '../../chat-component-bindings/src';\nexport type { MessageThreadSelector, TypingIndicatorSelector, ChatParticipantListSelector, SendBoxSelector, ErrorBarSelector as ChatErrorBarSelector } from '../../chat-component-bindings/src';\nexport { _IdentifierProvider, CameraButton, ControlBar, ControlBarButton, DevicesButton, EndCallButton, ErrorBar, GridLayout, LocalizationProvider, MessageStatusIndicator, MessageThread, MicrophoneButton, ParticipantItem, ParticipantList, ParticipantsButton, ScreenShareButton, SendBox, StreamMedia, TypingIndicator, VideoGallery, VideoTile, COMPONENT_LOCALE_EN_GB, COMPONENT_LOCALE_AR_SA, COMPONENT_LOCALE_CS_CZ, COMPONENT_LOCALE_DE_DE, COMPONENT_LOCALE_ES_ES, COMPONENT_LOCALE_FI_FI, COMPONENT_LOCALE_FR_FR, COMPONENT_LOCALE_HE_IL, COMPONENT_LOCALE_IT_IT, COMPONENT_LOCALE_JA_JP, COMPONENT_LOCALE_KO_KR, COMPONENT_LOCALE_NB_NO, COMPONENT_LOCALE_NL_NL, COMPONENT_LOCALE_PL_PL, COMPONENT_LOCALE_PT_BR, COMPONENT_LOCALE_RU_RU, COMPONENT_LOCALE_SV_SE, COMPONENT_LOCALE_TR_TR, COMPONENT_LOCALE_ZH_CN, COMPONENT_LOCALE_ZH_TW } from '../../react-components/src';\n/* @conditional-compile-remove(image-gallery) */\nexport { ImageGallery } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from '../../react-components/src';\n\n/* @conditional-compile-remove(raise-hand) */\nexport { RaiseHandButton } from '../../react-components/src';\n\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nexport { Dialpad } from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport { CameraAndMicrophoneSitePermissions, MicrophoneSitePermissions, CameraSitePermissions } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { CameraAndMicrophoneSitePermissionsStrings, CameraAndMicrophoneSitePermissionsProps, CameraSitePermissionsStrings, CameraSitePermissionsProps, CommonSitePermissionsProps, SitePermissionsStrings, SitePermissionsStyles, MicrophoneSitePermissionsStrings, MicrophoneSitePermissionsProps } from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type { MentionOptions, MentionDisplayOptions, MentionLookupOptions, Mention, MentionPopoverStrings } from '../../react-components/src';\nexport type { _IdentifierProviderProps, _Identifiers, ActiveErrorMessage, BaseCustomStyles, CallParticipantListParticipant, CameraButtonContextualMenuStyles, CameraButtonProps, CameraButtonStrings, CameraButtonStyles, ChatMessage, CommunicationParticipant, ComponentLocale, ComponentSlotStyle, ComponentStrings, ContentSystemMessage, ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles, ControlBarLayout, ControlBarProps, CreateVideoStreamViewResult, CustomAvatarOptions, CustomMessage, DevicesButtonContextualMenuStyles, DevicesButtonProps, DevicesButtonStrings, DevicesButtonStyles, EndCallButtonProps, EndCallButtonStrings, ErrorBarProps, ErrorBarStrings, ErrorType, GridLayoutProps, GridLayoutStyles, HorizontalGalleryStyles, JumpToNewMessageButtonProps, LocalizationProviderProps, LocalVideoCameraCycleButtonProps, LoadingState, Message, MessageAttachedStatus, MessageCommon, MessageContentType, MessageProps, MessageRenderer, MessageStatusIndicatorProps, MessageStatusIndicatorStrings, MessageThreadProps, MessageThreadStrings, MessageThreadStyles, MicrophoneButtonContextualMenuStyles, MicrophoneButtonProps, MicrophoneButtonStrings, MicrophoneButtonStyles, OnRenderAvatarCallback, OptionsDevice, ParticipantAddedSystemMessage, ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles, ParticipantListItemStyles, ParticipantListParticipant, ParticipantListProps, ParticipantListStyles, ParticipantMenuItemsCallback, ParticipantRemovedSystemMessage, ParticipantState, ParticipantsButtonContextualMenuStyles, ParticipantsButtonProps, ParticipantsButtonStrings, ParticipantsButtonStyles, ReadReceiptsBySenderId, ScreenShareButtonProps, ScreenShareButtonStrings, SendBoxProps, SendBoxStrings, SendBoxStylesProps, StreamMediaProps, SystemMessage, SystemMessageCommon, TopicUpdatedSystemMessage, TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps, UpdateMessageCallback, CancelEditCallback, VideoGalleryLayout, VideoGalleryLocalParticipant, VideoGalleryParticipant, VideoGalleryProps, VideoGalleryRemoteParticipant, VideoGalleryStream, VideoGalleryStrings, VideoGalleryStyles, VideoStreamOptions, VideoTileProps, VideoTileStylesProps, ViewScalingMode } from '../../react-components/src';\n/* @conditional-compile-remove(raise-hand) */\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\n/* @conditional-compile-remove(image-gallery) */\nexport type { ImageGalleryProps, ImageGalleryImageProps, ImageGalleryStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing) */\nexport type { ActiveFileUpload, SendBoxErrorBarError, FileDownloadHandler, FileDownloadError } from '../../react-components/src';\n/* @conditional-compile-remove(file-sharing) */ /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */\nexport type { FileMetadata } from '../../react-components/src';\n/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */\nexport type { BaseFileMetadata, FileMetadataAttachmentType, AttachmentDownloadResult, FileSharingMetadata, ImageFileMetadata } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings, VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedIOSStrings, BrowserPermissionDeniedStyles, BrowserPermissionDeniedIOSProps } from '../../react-components/src';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from '../../react-components/src';\n/* @conditional-compile-remove(vertical-gallery) */\nexport type { OverflowGalleryPosition } from '../../react-components/src';\n/* @conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type { StatefulChatClient, StatefulChatClientArgs, StatefulChatClientOptions, ChatMessageWithStatus, ChatClientState, ChatError, ChatErrors, ChatThreadClientState, ChatThreadProperties, ChatErrorTarget } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\n/* @conditional-compile-remove(vertical-gallery) */\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from '../../react-components/src';\n/* @conditional-compile-remove(close-captions) */\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Caption.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/Caption.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAY,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAgBlK;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAe,EAAE;IAC5D,MAAM,EACJ,WAAW,EACX,MAAM,EACN,WAAW,EACX,cAAc,EACf,GAAG,KAAK,CAAC;IACV,MAAM,cAAc,GAAa;QAC/B,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE,WAAW,CAAC,MAAM;QACxB,IAAI,EAAE,WAAW;QACjB,mBAAmB,EAAE,KAAK;QAC1B,iBAAiB,EAAE,OAAO;QAC1B,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,MAAM,EAAE,SAAS;aAClB;SACF;KACF,CAAC;IACF,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,oBAAC,OAAO,oBAAK,cAAc,EAAI,CAAC;IACjH,OAAO,oBAAC,KAAK,IAAC,UAAU,QAAC,aAAa,EAAC,OAAO,EAAC,eAAe,EAAC,OAAO;QAClE,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,aAAa,IAAG,QAAQ,CAAc;QAE7D,oBAAC,KAAK,IAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAE,iCAAiC;YACvE,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,6BAA6B;gBAClD,oBAAC,IAAI,IAAC,SAAS,EAAE,oBAAoB,IAAG,WAAW,CAAQ,CAChD;YACb,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAC,MAAM,IAChD,WAAW,CACD,CACP,CACF,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IPersona, Persona, Stack, PersonaSize, Text } from '@fluentui/react';\nimport React from 'react';\nimport { _FileUploadCardsStrings } from './FileUploadCards';\nimport { OnRenderAvatarCallback } from '../types';\nimport { captionClassName, captionsContentContainerClassName, displayNameClassName, displayNameContainerClassName, iconClassName } from './styles/Captions.style';\nimport { _CaptionsInfo } from './CaptionsBanner';\n\n/**\n * @internal\n * Props for a single line of caption.\n */\nexport interface _CaptionProps extends _CaptionsInfo {\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n}\n\n/**\n * @internal\n * A component for displaying a single line of caption\n */\nexport const _Caption = (props: _CaptionProps): JSX.Element => {\n const {\n displayName,\n userId,\n captionText,\n onRenderAvatar\n } = props;\n const personaOptions: IPersona = {\n hidePersonaDetails: true,\n size: PersonaSize.size32,\n text: displayName,\n showOverflowTooltip: false,\n initialsTextColor: 'white',\n styles: {\n root: {\n margin: '0.25rem'\n }\n }\n };\n const userIcon = onRenderAvatar ? onRenderAvatar(userId ?? '', personaOptions) : <Persona {...personaOptions} />;\n return <Stack horizontal verticalAlign=\"start\" horizontalAlign=\"start\">\n <Stack.Item className={iconClassName}>{userIcon}</Stack.Item>\n\n <Stack verticalAlign=\"start\" className={captionsContentContainerClassName}>\n <Stack.Item className={displayNameContainerClassName}>\n <Text className={displayNameClassName}>{displayName}</Text>\n </Stack.Item>\n <Stack.Item className={captionClassName} dir=\"auto\">\n {captionText}\n </Stack.Item>\n </Stack>\n </Stack>;\n};"]}
|
1
|
+
{"version":3,"file":"Caption.js","sourceRoot":"","sources":["../../../../../preprocess-dist/react-components/src/components/Caption.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAY,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAgBlK;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAe,EAAE;IAC5D,MAAM,EACJ,WAAW,EACX,MAAM,EACN,WAAW,EACX,cAAc,EACf,GAAG,KAAK,CAAC;IACV,MAAM,cAAc,GAAa;QAC/B,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE,WAAW,CAAC,MAAM;QACxB,IAAI,EAAE,WAAW;QACjB,mBAAmB,EAAE,KAAK;QAC1B,uBAAuB,EAAE,IAAI;QAC7B,iBAAiB,EAAE,OAAO;QAC1B,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,MAAM,EAAE,SAAS;aAClB;SACF;KACF,CAAC;IACF,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,oBAAC,OAAO,oBAAK,cAAc,EAAI,CAAC;IACjH,OAAO,oBAAC,KAAK,IAAC,UAAU,QAAC,aAAa,EAAC,OAAO,EAAC,eAAe,EAAC,OAAO;QAClE,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,aAAa,IAAG,QAAQ,CAAc;QAE7D,oBAAC,KAAK,IAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAE,iCAAiC;YACvE,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,6BAA6B;gBAClD,oBAAC,IAAI,IAAC,SAAS,EAAE,oBAAoB,IAAG,WAAW,CAAQ,CAChD;YACb,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAC,MAAM,IAChD,WAAW,CACD,CACP,CACF,CAAC;AACb,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IPersona, Persona, Stack, PersonaSize, Text } from '@fluentui/react';\nimport React from 'react';\nimport { _FileUploadCardsStrings } from './FileUploadCards';\nimport { OnRenderAvatarCallback } from '../types';\nimport { captionClassName, captionsContentContainerClassName, displayNameClassName, displayNameContainerClassName, iconClassName } from './styles/Captions.style';\nimport { _CaptionsInfo } from './CaptionsBanner';\n\n/**\n * @internal\n * Props for a single line of caption.\n */\nexport interface _CaptionProps extends _CaptionsInfo {\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n}\n\n/**\n * @internal\n * A component for displaying a single line of caption\n */\nexport const _Caption = (props: _CaptionProps): JSX.Element => {\n const {\n displayName,\n userId,\n captionText,\n onRenderAvatar\n } = props;\n const personaOptions: IPersona = {\n hidePersonaDetails: true,\n size: PersonaSize.size32,\n text: displayName,\n showOverflowTooltip: false,\n imageShouldStartVisible: true,\n initialsTextColor: 'white',\n styles: {\n root: {\n margin: '0.25rem'\n }\n }\n };\n const userIcon = onRenderAvatar ? onRenderAvatar(userId ?? '', personaOptions) : <Persona {...personaOptions} />;\n return <Stack horizontal verticalAlign=\"start\" horizontalAlign=\"start\">\n <Stack.Item className={iconClassName}>{userIcon}</Stack.Item>\n\n <Stack verticalAlign=\"start\" className={captionsContentContainerClassName}>\n <Stack.Item className={displayNameContainerClassName}>\n <Text className={displayNameClassName}>{displayName}</Text>\n </Stack.Item>\n <Stack.Item className={captionClassName} dir=\"auto\">\n {captionText}\n </Stack.Item>\n </Stack>\n </Stack>;\n};"]}
|
@@ -1,9 +1,11 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { MessageThreadStrings } from '../MessageThread';
|
3
3
|
import { ChatMessage, ComponentSlotStyle, OnRenderAvatarCallback } from '../../types';
|
4
|
+
import { BlockedMessage } from '../../types';
|
4
5
|
import { FileDownloadHandler, FileMetadata } from '../FileDownloadCards';
|
6
|
+
import { MentionOptions } from '../MentionPopover';
|
5
7
|
declare type ChatMessageComponentProps = {
|
6
|
-
message: ChatMessage;
|
8
|
+
message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage;
|
7
9
|
userId: string;
|
8
10
|
messageContainerStyle?: ComponentSlotStyle;
|
9
11
|
showDate?: boolean;
|
@@ -60,6 +62,25 @@ declare type ChatMessageComponentProps = {
|
|
60
62
|
* @beta
|
61
63
|
*/
|
62
64
|
onDisplayDateTimeString?: (messageDate: Date) => string;
|
65
|
+
/**
|
66
|
+
* Optional props needed to lookup suggestions and display mentions in the mention scenario.
|
67
|
+
* @beta
|
68
|
+
*/
|
69
|
+
mentionOptions?: MentionOptions;
|
70
|
+
/**
|
71
|
+
* Optional function to fetch attachments.
|
72
|
+
* @beta
|
73
|
+
*/
|
74
|
+
onFetchAttachments?: (attachment: FileMetadata) => Promise<void>;
|
75
|
+
/**
|
76
|
+
* Optional callback called when an inline image is clicked.
|
77
|
+
* @beta
|
78
|
+
*/
|
79
|
+
onInlineImageClicked?: (attachmentId: string, messageId: string) => Promise<void>;
|
80
|
+
/**
|
81
|
+
* Optional map of attachment ids to blob urls.
|
82
|
+
*/
|
83
|
+
attachmentsMap?: Record<string, string>;
|
63
84
|
};
|
64
85
|
/**
|
65
86
|
* @private
|
@@ -16,6 +16,7 @@ import { ChatMessageComponentAsMessageBubble } from './ChatMessageComponentAsMes
|
|
16
16
|
* @private
|
17
17
|
*/
|
18
18
|
export const ChatMessageComponent = (props) => {
|
19
|
+
var _a, _b;
|
19
20
|
const [isEditing, setIsEditing] = useState(false);
|
20
21
|
const onEditClick = useCallback(() => setIsEditing(true), [setIsEditing]);
|
21
22
|
const { onDeleteMessage, onSendMessage, message } = props;
|
@@ -41,10 +42,16 @@ export const ChatMessageComponent = (props) => {
|
|
41
42
|
}), onCancel: messageId => {
|
42
43
|
props.onCancelEditMessage && props.onCancelEditMessage(messageId);
|
43
44
|
setIsEditing(false);
|
44
|
-
}
|
45
|
+
},
|
46
|
+
/* @conditional-compile-remove(mention) */ mentionLookupOptions: (_a = props.mentionOptions) === null || _a === void 0 ? void 0 : _a.lookupOptions });
|
45
47
|
}
|
46
48
|
else {
|
47
|
-
return React.createElement(ChatMessageComponentAsMessageBubble, Object.assign({}, props, { onRemoveClick: onRemoveClick, onEditClick: onEditClick, onResendClick: onResendClick, onRenderAvatar: props.onRenderAvatar,
|
49
|
+
return React.createElement(ChatMessageComponentAsMessageBubble, Object.assign({}, props, { onRemoveClick: onRemoveClick, onEditClick: onEditClick, onResendClick: onResendClick, onRenderAvatar: props.onRenderAvatar,
|
50
|
+
/* @conditional-compile-remove(date-time-customization) */ onDisplayDateTimeString: props.onDisplayDateTimeString, strings: props.strings,
|
51
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ onFetchAttachments: props.onFetchAttachments,
|
52
|
+
/* @conditional-compile-remove(image-gallery) */ onInlineImageClicked: props.onInlineImageClicked,
|
53
|
+
/* @conditional-compile-remove(image-gallery) */ attachmentsMap: props.attachmentsMap,
|
54
|
+
/* @conditional-compile-remove(mention) */ mentionDisplayOptions: (_b = props.mentionOptions) === null || _b === void 0 ? void 0 : _b.displayOptions }));
|
48
55
|
}
|
49
56
|
};
|
50
57
|
//# sourceMappingURL=ChatMessageComponent.js.map
|
package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatMessageComponent.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/ChatMessage/ChatMessageComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;
|
1
|
+
{"version":3,"file":"ChatMessageComponent.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/ChatMessage/ChatMessageComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAGlC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAKhF,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAwF5F;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;;IACpF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAC1E,MAAM,EACJ,eAAe,EACf,aAAa,EACb,OAAO,EACR,GAAG,KAAK,CAAC;IACV,MAAM,eAAe,GAAG,iBAAiB,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3F,MAAM,OAAO,GAAG,SAAS,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACrC,IAAI,eAAe,IAAI,OAAO,CAAC,SAAS,EAA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,MAAA,KAAK,CAAC,cAAc,0CAAE,aAAa,GAAI,CAAC;KAC1G;SAAM;QACL,OAAO,oBAAC,mCAAmC,oBAAK,KAAK,IAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,cAAc,EAAE,KAAK,CAAC,cAAc;YACjL,0DAA0D,CAAC,uBAAuB,EAAE,KAAK,CAAC,uBAAuB,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO;YACzI,uEAAuE,CAAC,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;YACpH,gDAAgD,CAAC,oBAAoB,EAAE,KAAK,CAAC,oBAAoB;YACjG,gDAAgD,CAAC,cAAc,EAAE,KAAK,CAAC,cAAc;YACrF,0CAA0C,CAAC,qBAAqB,EAAE,MAAA,KAAK,CAAC,cAAc,0CAAE,cAAc,IAAI,CAAC;KAC5G;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { _formatString } from '@internal/acs-ui-common';\nimport React, { useCallback, useState } from 'react';\nimport { ChatMessageComponentAsEditBox } from './ChatMessageComponentAsEditBox';\nimport { MessageThreadStrings } from '../MessageThread';\nimport { ChatMessage, ComponentSlotStyle, OnRenderAvatarCallback } from '../../types';\n/* @conditional-compile-remove(data-loss-prevention) */\nimport { BlockedMessage } from '../../types';\nimport { ChatMessageComponentAsMessageBubble } from './ChatMessageComponentAsMessageBubble';\nimport { FileDownloadHandler, FileMetadata } from '../FileDownloadCards';\n/* @conditional-compile-remove(mention) */\nimport { MentionOptions } from '../MentionPopover';\ntype ChatMessageComponentProps = {\n message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */BlockedMessage;\n userId: string;\n messageContainerStyle?: ComponentSlotStyle;\n showDate?: boolean;\n disableEditing?: boolean;\n onUpdateMessage?: (messageId: string, content: string, metadata?: Record<string, string>, options?: {\n attachedFilesMetadata?: FileMetadata[];\n }) => Promise<void>;\n onCancelEditMessage?: (messageId: string) => void;\n /**\n * Callback to delete a message. Also called before resending a message that failed to send.\n * @param messageId ID of the message to delete\n */\n onDeleteMessage?: (messageId: string) => Promise<void>;\n /**\n * Callback to send a message\n * @param content The message content to send\n */\n onSendMessage?: (content: string) => Promise<void>;\n strings: MessageThreadStrings;\n messageStatus?: string;\n /**\n * Optional text to display when the message status is 'failed'.\n */\n failureReason?: string;\n /**\n * Whether the status indicator for each message is displayed or not.\n */\n showMessageStatus?: boolean;\n /**\n * Whether to overlap avatar and message when the view is width constrained.\n */\n shouldOverlapAvatarAndMessage: boolean;\n /**\n * Optional callback to render uploaded files in the message component.\n */\n onRenderFileDownloads?: (userId: string, message: ChatMessage) => JSX.Element;\n /**\n * Optional function called when someone clicks on the file download icon.\n */\n fileDownloadHandler?: FileDownloadHandler;\n remoteParticipantsCount?: number;\n onActionButtonClick: (message: ChatMessage, setMessageReadBy: (readBy: {\n id: string;\n displayName: string;\n }[]) => void) => void;\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n\n /**\n * Optional function to provide customized date format.\n * @beta\n */\n onDisplayDateTimeString?: (messageDate: Date) => string;\n /* @conditional-compile-remove(mention) */\n /**\n * Optional props needed to lookup suggestions and display mentions in the mention scenario.\n * @beta\n */\n mentionOptions?: MentionOptions;\n /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */\n /**\n * Optional function to fetch attachments.\n * @beta\n */\n onFetchAttachments?: (attachment: FileMetadata) => Promise<void>;\n /* @conditional-compile-remove(image-gallery) */\n /**\n * Optional callback called when an inline image is clicked.\n * @beta\n */\n onInlineImageClicked?: (attachmentId: string, messageId: string) => Promise<void>;\n /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */\n /**\n * Optional map of attachment ids to blob urls.\n */\n attachmentsMap?: Record<string, string>;\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponent = (props: ChatMessageComponentProps): JSX.Element => {\n const [isEditing, setIsEditing] = useState(false);\n const onEditClick = useCallback(() => setIsEditing(true), [setIsEditing]);\n const {\n onDeleteMessage,\n onSendMessage,\n message\n } = props;\n const clientMessageId = 'clientMessageId' in message ? message.clientMessageId : undefined;\n const content = 'content' in message ? message.content : undefined;\n const onRemoveClick = useCallback(() => {\n if (onDeleteMessage && message.messageId) {\n onDeleteMessage(message.messageId);\n }\n // when fail to send, message does not have message id, delete message using clientMessageId\n else if (onDeleteMessage && message.messageType === 'chat' && clientMessageId) {\n onDeleteMessage(clientMessageId);\n }\n }, [onDeleteMessage, message.messageId, message.messageType, clientMessageId]);\n const onResendClick = useCallback(() => {\n onDeleteMessage && clientMessageId && onDeleteMessage(clientMessageId);\n onSendMessage && onSendMessage(content !== undefined ? content : '');\n }, [clientMessageId, content, onSendMessage, onDeleteMessage]);\n if (isEditing && message.messageType === 'chat') {\n return <ChatMessageComponentAsEditBox message={message} strings={props.strings} onSubmit={async (text, metadata, options) => {\n props.onUpdateMessage && message.messageId && (await props.onUpdateMessage(message.messageId, text, metadata, options));\n setIsEditing(false);\n }} onCancel={messageId => {\n props.onCancelEditMessage && props.onCancelEditMessage(messageId);\n setIsEditing(false);\n }}\n /* @conditional-compile-remove(mention) */ mentionLookupOptions={props.mentionOptions?.lookupOptions} />;\n } else {\n return <ChatMessageComponentAsMessageBubble {...props} onRemoveClick={onRemoveClick} onEditClick={onEditClick} onResendClick={onResendClick} onRenderAvatar={props.onRenderAvatar}\n /* @conditional-compile-remove(date-time-customization) */ onDisplayDateTimeString={props.onDisplayDateTimeString} strings={props.strings}\n /* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ onFetchAttachments={props.onFetchAttachments}\n /* @conditional-compile-remove(image-gallery) */ onInlineImageClicked={props.onInlineImageClicked}\n /* @conditional-compile-remove(image-gallery) */ attachmentsMap={props.attachmentsMap}\n /* @conditional-compile-remove(mention) */ mentionDisplayOptions={props.mentionOptions?.displayOptions} />;\n }\n};\"../../../../acs-ui-common/src\""]}
|
package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
import { MessageThreadStrings } from '../MessageThread';
|
3
3
|
import { ChatMessage } from '../../types';
|
4
4
|
import { FileMetadata } from '../FileDownloadCards';
|
5
|
+
import { MentionLookupOptions } from '../MentionPopover';
|
5
6
|
/** @private */
|
6
7
|
export declare type ChatMessageComponentAsEditBoxProps = {
|
7
8
|
onCancel?: (messageId: string) => void;
|
@@ -10,6 +11,7 @@ export declare type ChatMessageComponentAsEditBoxProps = {
|
|
10
11
|
}) => void;
|
11
12
|
message: ChatMessage;
|
12
13
|
strings: MessageThreadStrings;
|
14
|
+
mentionLookupOptions?: MentionLookupOptions;
|
13
15
|
};
|
14
16
|
/**
|
15
17
|
* @private
|
package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
|
-
import { concatStyleSets, Icon, mergeStyles } from '@fluentui/react';
|
3
|
+
import { concatStyleSets, Icon, mergeStyles, Stack } from '@fluentui/react';
|
4
4
|
import { ChatMyMessage } from '@fluentui-contrib/react-chat';
|
5
5
|
import { mergeClasses } from '@fluentui/react-components';
|
6
6
|
import { _formatString } from "../../../../acs-ui-common/src";
|
@@ -10,7 +10,7 @@ import { editBoxStyle, inputBoxIcon, editingButtonStyle, editBoxStyleSet } from
|
|
10
10
|
import { InputBoxButton, InputBoxComponent } from '../InputBoxComponent';
|
11
11
|
import { useChatMyMessageStyles } from '../styles/MessageThread.styles';
|
12
12
|
import { _FileUploadCards } from '../FileUploadCards';
|
13
|
-
import { chatMessageFailedTagStyle, useChatMessageEditContainerStyles } from '../styles/ChatMessageComponent.styles';
|
13
|
+
import { chatMessageFailedTagStyle, editChatMessageFailedTagStyle, chatMessageFailedTagStackItemStyle, editChatMessageButtonsStackStyle, useChatMessageEditContainerStyles } from '../styles/ChatMessageComponent.styles';
|
14
14
|
const MAXIMUM_LENGTH_OF_MESSAGE = 8000;
|
15
15
|
const onRenderCancelIcon = (color) => {
|
16
16
|
const className = mergeStyles(inputBoxIcon, {
|
@@ -29,6 +29,8 @@ const onRenderSubmitIcon = (color) => {
|
|
29
29
|
*/
|
30
30
|
export const ChatMessageComponentAsEditBox = (props) => {
|
31
31
|
const { onCancel, onSubmit, strings, message } = props;
|
32
|
+
/* @conditional-compile-remove(mention) */
|
33
|
+
const { mentionLookupOptions } = props;
|
32
34
|
const [textValue, setTextValue] = useState(message.content || '');
|
33
35
|
const [attachedFilesMetadata, setAttachedFilesMetadata] = React.useState(getMessageAttachedFilesMetadata(message));
|
34
36
|
const editTextFieldRef = React.useRef(null);
|
@@ -70,7 +72,7 @@ export const ChatMessageComponentAsEditBox = (props) => {
|
|
70
72
|
}, [attachedFilesMetadata]);
|
71
73
|
const getContent = () => {
|
72
74
|
return React.createElement(React.Fragment, null,
|
73
|
-
React.createElement(InputBoxComponent, {
|
75
|
+
React.createElement(InputBoxComponent, { id: 'editbox', textFieldRef: editTextFieldRef, inputClassName: editBoxStyle, placeholderText: strings.editBoxPlaceholderText, textValue: textValue, onChange: setText, onKeyDown: ev => {
|
74
76
|
if (ev.key === 'ArrowUp' || ev.key === 'ArrowDown') {
|
75
77
|
ev.stopPropagation();
|
76
78
|
}
|
@@ -78,19 +80,24 @@ export const ChatMessageComponentAsEditBox = (props) => {
|
|
78
80
|
submitEnabled && onSubmit(textValue, message.metadata, {
|
79
81
|
attachedFilesMetadata
|
80
82
|
});
|
81
|
-
}, supportNewline: false, maxLength: MAXIMUM_LENGTH_OF_MESSAGE, errorMessage: textTooLongMessage, styles: editBoxStyles
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
83
|
+
}, supportNewline: false, maxLength: MAXIMUM_LENGTH_OF_MESSAGE, errorMessage: textTooLongMessage, styles: editBoxStyles,
|
84
|
+
/* @conditional-compile-remove(mention) */ mentionLookupOptions: mentionLookupOptions }),
|
85
|
+
React.createElement(Stack, { horizontal: true, horizontalAlign: "end", className: editChatMessageButtonsStackStyle, tokens: {
|
86
|
+
childrenGap: '0.25rem'
|
87
|
+
} },
|
88
|
+
message.failureReason && React.createElement(Stack.Item, { grow: true, align: "stretch", className: chatMessageFailedTagStackItemStyle },
|
89
|
+
React.createElement("div", { className: mergeStyles(chatMessageFailedTagStyle(theme), editChatMessageFailedTagStyle) }, message.failureReason)),
|
90
|
+
React.createElement(Stack.Item, { align: "end" },
|
91
|
+
React.createElement(InputBoxButton, { className: editingButtonStyle, ariaLabel: strings.editBoxCancelButton, tooltipContent: strings.editBoxCancelButton, onRenderIcon: onRenderThemedCancelIcon, onClick: () => {
|
92
|
+
onCancel && onCancel(message.messageId);
|
93
|
+
}, id: 'dismissIconWrapper' })),
|
94
|
+
React.createElement(Stack.Item, { align: "end" },
|
95
|
+
React.createElement(InputBoxButton, { className: editingButtonStyle, ariaLabel: strings.editBoxSubmitButton, tooltipContent: strings.editBoxSubmitButton, onRenderIcon: onRenderThemedSubmitIcon, onClick: e => {
|
96
|
+
submitEnabled && onSubmit(textValue, message.metadata, {
|
97
|
+
attachedFilesMetadata
|
98
|
+
});
|
99
|
+
e.stopPropagation();
|
100
|
+
}, id: 'submitIconWrapper' }))),
|
94
101
|
onRenderFileUploads());
|
95
102
|
};
|
96
103
|
const bodyClassName = mergeClasses(editContainerStyles.body, message.failureReason !== undefined ? editContainerStyles.bodyError : editContainerStyles.bodyDefault);
|
@@ -105,6 +112,8 @@ const isMessageEmpty = (messageText, attachedFilesMetadata) => messageText.trim(
|
|
105
112
|
const getMessageState = (messageText, attachedFilesMetadata) => isMessageEmpty(messageText, attachedFilesMetadata) ? 'too short' : isMessageTooLong(messageText) ? 'too long' : 'OK';
|
106
113
|
// @TODO: Remove when file-sharing feature becomes stable.
|
107
114
|
const getMessageAttachedFilesMetadata = (message) => {
|
115
|
+
/* @conditional-compile-remove(file-sharing) */
|
116
|
+
return message.attachedFilesMetadata;
|
108
117
|
return [];
|
109
118
|
};
|
110
119
|
//# sourceMappingURL=ChatMessageComponentAsEditBox.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatMessageComponentAsEditBox.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAc,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,sCAAgC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3G,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,yBAAyB,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AACrH,MAAM,yBAAyB,GAAG,IAAI,CAAC;AACvC,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAe,EAAE;IACxD,MAAM,SAAS,GAAG,WAAW,CAAC,YAAY,EAAE;QAC1C,KAAK;KACN,CAAC,CAAC;IACH,OAAO,oBAAC,IAA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,EAAE,IAAI,EAAE;YACP,SAAS,EAAE,aAAa;SACzB,IACI,UAAU,EAAE,CACC,CAAC;AACrB,CAAC,CAAC;AACF,MAAM,gBAAgB,GAAG,CAAC,WAAmB,EAAW,EAAE,CAAC,WAAW,CAAC,MAAM,GAAG,yBAAyB,CAAC;AAC1G,MAAM,cAAc,GAAG,CAAC,WAAmB,EAAE,qBAAqC,EAAW,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC,CAAC;AACtK,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAE,qBAAqC,EAAgB,EAAE,CAAC,cAAc,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;AAE3N,0DAA0D;AAC1D,MAAM,+BAA+B,GAAG,CAAC,OAAoB,EAA8B,EAAE;IAC3F,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { concatStyleSets, Icon, ITextField, mergeStyles } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useTheme } from '../../theming/FluentThemeProvider';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { editBoxStyle, inputBoxIcon, editingButtonStyle, editBoxStyleSet } from '../styles/EditBox.styles';\nimport { InputBoxButton, InputBoxComponent } from '../InputBoxComponent';\nimport { MessageThreadStrings } from '../MessageThread';\nimport { useChatMyMessageStyles } from '../styles/MessageThread.styles';\nimport { ChatMessage } from '../../types';\nimport { _FileUploadCards } from '../FileUploadCards';\nimport { FileMetadata } from '../FileDownloadCards';\nimport { chatMessageFailedTagStyle, useChatMessageEditContainerStyles } from '../styles/ChatMessageComponent.styles';\nconst MAXIMUM_LENGTH_OF_MESSAGE = 8000;\nconst onRenderCancelIcon = (color: string): JSX.Element => {\n const className = mergeStyles(inputBoxIcon, {\n color\n });\n return <Icon iconName={'EditBoxCancel'} className={className} />;\n};\nconst onRenderSubmitIcon = (color: string): JSX.Element => {\n const className = mergeStyles(inputBoxIcon, {\n color\n });\n return <Icon iconName={'EditBoxSubmit'} className={className} />;\n};\n\n/** @private */\nexport type ChatMessageComponentAsEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (text: string, metadata?: Record<string, string>, options?: {\n attachedFilesMetadata?: FileMetadata[];\n }) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n};\ntype MessageState = 'OK' | 'too short' | 'too long';\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsEditBox = (props: ChatMessageComponentAsEditBoxProps): JSX.Element => {\n const {\n onCancel,\n onSubmit,\n strings,\n message\n } = props;\n const [textValue, setTextValue] = useState<string>(message.content || '');\n const [attachedFilesMetadata, setAttachedFilesMetadata] = React.useState(getMessageAttachedFilesMetadata(message));\n const editTextFieldRef = React.useRef<ITextField>(null);\n const theme = useTheme();\n const messageState = getMessageState(textValue, attachedFilesMetadata ?? []);\n const submitEnabled = messageState === 'OK';\n const editContainerStyles = useChatMessageEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n const setText = (event?: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string): void => {\n setTextValue(newValue ?? '');\n };\n const textTooLongMessage = messageState === 'too long' ? _formatString(strings.editBoxTextLimit, {\n limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}`\n }) : undefined;\n const onRenderThemedCancelIcon = useCallback((isHover: boolean) => onRenderCancelIcon(isHover ? theme.palette.accent : theme.palette.neutralSecondary), [theme.palette.neutralSecondary, theme.palette.accent]);\n const onRenderThemedSubmitIcon = useCallback((isHover: boolean) => onRenderSubmitIcon(isHover ? theme.palette.accent : theme.palette.neutralSecondary), [theme.palette.neutralSecondary, theme.palette.accent]);\n const editBoxStyles = useMemo(() => {\n return concatStyleSets(editBoxStyleSet, {\n textField: {\n borderColor: theme.palette.themePrimary\n }\n });\n }, [theme.palette.themePrimary]);\n const onRenderFileUploads = useCallback(() => {\n return !!attachedFilesMetadata && attachedFilesMetadata.length > 0 && <div style={{\n margin: '0.25rem'\n }}>\n <_FileUploadCards activeFileUploads={attachedFilesMetadata?.map(file => ({\n id: file.name,\n filename: file.name,\n progress: 1\n }))} onCancelFileUpload={fileId => {\n setAttachedFilesMetadata(attachedFilesMetadata?.filter(file => file.name !== fileId));\n }} />\n </div>;\n }, [attachedFilesMetadata]);\n const getContent = (): JSX.Element => {\n return <>\n <InputBoxComponent inlineChildren={false} id={'editbox'} textFieldRef={editTextFieldRef} inputClassName={editBoxStyle} placeholderText={strings.editBoxPlaceholderText} textValue={textValue} onChange={setText} onKeyDown={ev => {\n if (ev.key === 'ArrowUp' || ev.key === 'ArrowDown') {\n ev.stopPropagation();\n }\n }} onEnterKeyDown={() => {\n submitEnabled && onSubmit(textValue, message.metadata, {\n attachedFilesMetadata\n });\n }} supportNewline={false} maxLength={MAXIMUM_LENGTH_OF_MESSAGE} errorMessage={textTooLongMessage} styles={editBoxStyles}>\n <InputBoxButton className={editingButtonStyle} ariaLabel={strings.editBoxCancelButton} tooltipContent={strings.editBoxCancelButton} onRenderIcon={onRenderThemedCancelIcon} onClick={() => {\n onCancel && onCancel(message.messageId);\n }} id={'dismissIconWrapper'} />\n <InputBoxButton className={editingButtonStyle} ariaLabel={strings.editBoxSubmitButton} tooltipContent={strings.editBoxSubmitButton} onRenderIcon={onRenderThemedSubmitIcon} onClick={e => {\n submitEnabled && onSubmit(textValue, message.metadata, {\n attachedFilesMetadata\n });\n e.stopPropagation();\n }} id={'submitIconWrapper'} />\n </InputBoxComponent>\n {message.failureReason && <div className={mergeStyles(chatMessageFailedTagStyle(theme), {\n padding: '0.5rem'\n })}>\n {message.failureReason}\n </div>}\n {onRenderFileUploads()}\n </>;\n };\n const bodyClassName = mergeClasses(editContainerStyles.body, message.failureReason !== undefined ? editContainerStyles.bodyError : editContainerStyles.bodyDefault);\n return <ChatMyMessage root={{\n className: mergeClasses(chatMyMessageStyles.root, editContainerStyles.root)\n }} body={{\n className: bodyClassName\n }}>\n {getContent()}\n </ChatMyMessage>;\n};\nconst isMessageTooLong = (messageText: string): boolean => messageText.length > MAXIMUM_LENGTH_OF_MESSAGE;\nconst isMessageEmpty = (messageText: string, attachedFilesMetadata: FileMetadata[]): boolean => messageText.trim().length === 0 && attachedFilesMetadata.length === 0;\nconst getMessageState = (messageText: string, attachedFilesMetadata: FileMetadata[]): MessageState => isMessageEmpty(messageText, attachedFilesMetadata) ? 'too short' : isMessageTooLong(messageText) ? 'too long' : 'OK';\n\n// @TODO: Remove when file-sharing feature becomes stable.\nconst getMessageAttachedFilesMetadata = (message: ChatMessage): FileMetadata[] | undefined => {\n return [];\n};\"../../../../acs-ui-common/src\""]}
|
1
|
+
{"version":3,"file":"ChatMessageComponentAsEditBox.js","sourceRoot":"","sources":["../../../../../../preprocess-dist/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAc,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,sCAAgC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,EA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C,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC,CAAC;AACtK,MAAM,eAAe,GAAG,CAAC,WAAmB,EAAE,qBAAqC,EAAgB,EAAE,CAAC,cAAc,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;AAE3N,0DAA0D;AAC1D,MAAM,+BAA+B,GAAG,CAAC,OAAoB,EAA8B,EAAE;IAC3F,+CAA+C;IAC/C,OAAO,OAAO,CAAC,qBAAqB,CAAC;IACrC,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { concatStyleSets, Icon, ITextField, mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useTheme } from '../../theming/FluentThemeProvider';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\nimport { editBoxStyle, inputBoxIcon, editingButtonStyle, editBoxStyleSet } from '../styles/EditBox.styles';\nimport { InputBoxButton, InputBoxComponent } from '../InputBoxComponent';\nimport { MessageThreadStrings } from '../MessageThread';\nimport { useChatMyMessageStyles } from '../styles/MessageThread.styles';\nimport { ChatMessage } from '../../types';\nimport { _FileUploadCards } from '../FileUploadCards';\nimport { FileMetadata } from '../FileDownloadCards';\nimport { chatMessageFailedTagStyle, editChatMessageFailedTagStyle, chatMessageFailedTagStackItemStyle, editChatMessageButtonsStackStyle, useChatMessageEditContainerStyles } from '../styles/ChatMessageComponent.styles';\n/* @conditional-compile-remove(mention) */\nimport { MentionLookupOptions } from '../MentionPopover';\nconst MAXIMUM_LENGTH_OF_MESSAGE = 8000;\nconst onRenderCancelIcon = (color: string): JSX.Element => {\n const className = mergeStyles(inputBoxIcon, {\n color\n });\n return <Icon iconName={'EditBoxCancel'} className={className} />;\n};\nconst onRenderSubmitIcon = (color: string): JSX.Element => {\n const className = mergeStyles(inputBoxIcon, {\n color\n });\n return <Icon iconName={'EditBoxSubmit'} className={className} />;\n};\n\n/** @private */\nexport type ChatMessageComponentAsEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (text: string, metadata?: Record<string, string>, options?: {\n attachedFilesMetadata?: FileMetadata[];\n }) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions?: MentionLookupOptions;\n};\ntype MessageState = 'OK' | 'too short' | 'too long';\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsEditBox = (props: ChatMessageComponentAsEditBoxProps): JSX.Element => {\n const {\n onCancel,\n onSubmit,\n strings,\n message\n } = props;\n /* @conditional-compile-remove(mention) */\n const {\n mentionLookupOptions\n } = props;\n const [textValue, setTextValue] = useState<string>(message.content || '');\n const [attachedFilesMetadata, setAttachedFilesMetadata] = React.useState(getMessageAttachedFilesMetadata(message));\n const editTextFieldRef = React.useRef<ITextField>(null);\n const theme = useTheme();\n const messageState = getMessageState(textValue, attachedFilesMetadata ?? []);\n const submitEnabled = messageState === 'OK';\n const editContainerStyles = useChatMessageEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n const setText = (event?: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string): void => {\n setTextValue(newValue ?? '');\n };\n const textTooLongMessage = messageState === 'too long' ? _formatString(strings.editBoxTextLimit, {\n limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}`\n }) : undefined;\n const onRenderThemedCancelIcon = useCallback((isHover: boolean) => onRenderCancelIcon(isHover ? theme.palette.accent : theme.palette.neutralSecondary), [theme.palette.neutralSecondary, theme.palette.accent]);\n const onRenderThemedSubmitIcon = useCallback((isHover: boolean) => onRenderSubmitIcon(isHover ? theme.palette.accent : theme.palette.neutralSecondary), [theme.palette.neutralSecondary, theme.palette.accent]);\n const editBoxStyles = useMemo(() => {\n return concatStyleSets(editBoxStyleSet, {\n textField: {\n borderColor: theme.palette.themePrimary\n }\n });\n }, [theme.palette.themePrimary]);\n const onRenderFileUploads = useCallback(() => {\n return !!attachedFilesMetadata && attachedFilesMetadata.length > 0 && <div style={{\n margin: '0.25rem'\n }}>\n <_FileUploadCards activeFileUploads={attachedFilesMetadata?.map(file => ({\n id: file.name,\n filename: file.name,\n progress: 1\n }))} onCancelFileUpload={fileId => {\n setAttachedFilesMetadata(attachedFilesMetadata?.filter(file => file.name !== fileId));\n }} />\n </div>;\n }, [attachedFilesMetadata]);\n const getContent = (): JSX.Element => {\n return <>\n <InputBoxComponent id={'editbox'} textFieldRef={editTextFieldRef} inputClassName={editBoxStyle} placeholderText={strings.editBoxPlaceholderText} textValue={textValue} onChange={setText} onKeyDown={ev => {\n if (ev.key === 'ArrowUp' || ev.key === 'ArrowDown') {\n ev.stopPropagation();\n }\n }} onEnterKeyDown={() => {\n submitEnabled && onSubmit(textValue, message.metadata, {\n attachedFilesMetadata\n });\n }} supportNewline={false} maxLength={MAXIMUM_LENGTH_OF_MESSAGE} errorMessage={textTooLongMessage} styles={editBoxStyles}\n /* @conditional-compile-remove(mention) */ mentionLookupOptions={mentionLookupOptions}></InputBoxComponent>\n <Stack horizontal horizontalAlign=\"end\" className={editChatMessageButtonsStackStyle} tokens={{\n childrenGap: '0.25rem'\n }}>\n {message.failureReason && <Stack.Item grow align=\"stretch\" className={chatMessageFailedTagStackItemStyle}>\n <div className={mergeStyles(chatMessageFailedTagStyle(theme), editChatMessageFailedTagStyle)}>\n {message.failureReason}\n </div>\n </Stack.Item>}\n <Stack.Item align=\"end\">\n <InputBoxButton className={editingButtonStyle} ariaLabel={strings.editBoxCancelButton} tooltipContent={strings.editBoxCancelButton} onRenderIcon={onRenderThemedCancelIcon} onClick={() => {\n onCancel && onCancel(message.messageId);\n }} id={'dismissIconWrapper'} />\n </Stack.Item>\n <Stack.Item align=\"end\">\n <InputBoxButton className={editingButtonStyle} ariaLabel={strings.editBoxSubmitButton} tooltipContent={strings.editBoxSubmitButton} onRenderIcon={onRenderThemedSubmitIcon} onClick={e => {\n submitEnabled && onSubmit(textValue, message.metadata, {\n attachedFilesMetadata\n });\n e.stopPropagation();\n }} id={'submitIconWrapper'} />\n </Stack.Item>\n </Stack>\n {onRenderFileUploads()}\n </>;\n };\n const bodyClassName = mergeClasses(editContainerStyles.body, message.failureReason !== undefined ? editContainerStyles.bodyError : editContainerStyles.bodyDefault);\n return <ChatMyMessage root={{\n className: mergeClasses(chatMyMessageStyles.root, editContainerStyles.root)\n }} body={{\n className: bodyClassName\n }}>\n {getContent()}\n </ChatMyMessage>;\n};\nconst isMessageTooLong = (messageText: string): boolean => messageText.length > MAXIMUM_LENGTH_OF_MESSAGE;\nconst isMessageEmpty = (messageText: string, attachedFilesMetadata: FileMetadata[]): boolean => messageText.trim().length === 0 && attachedFilesMetadata.length === 0;\nconst getMessageState = (messageText: string, attachedFilesMetadata: FileMetadata[]): MessageState => isMessageEmpty(messageText, attachedFilesMetadata) ? 'too short' : isMessageTooLong(messageText) ? 'too long' : 'OK';\n\n// @TODO: Remove when file-sharing feature becomes stable.\nconst getMessageAttachedFilesMetadata = (message: ChatMessage): FileMetadata[] | undefined => {\n /* @conditional-compile-remove(file-sharing) */\n return message.attachedFilesMetadata;\n return [];\n};\"../../../../acs-ui-common/src\""]}
|
@@ -1,12 +1,15 @@
|
|
1
1
|
import { IStyle } from '@fluentui/react';
|
2
2
|
import React from 'react';
|
3
3
|
import { ChatMessage } from '../../types/ChatMessage';
|
4
|
+
import { FileMetadata } from '../FileDownloadCards';
|
5
|
+
import { BlockedMessage } from '../../types/ChatMessage';
|
4
6
|
import { MessageThreadStrings } from '../MessageThread';
|
5
7
|
import { ComponentSlotStyle, OnRenderAvatarCallback } from '../../types';
|
6
8
|
import { FileDownloadHandler } from '../FileDownloadCards';
|
9
|
+
import { MentionDisplayOptions } from '../MentionPopover';
|
7
10
|
import { MessageStatus } from "../../../../acs-ui-common/src";
|
8
11
|
declare type ChatMessageComponentAsMessageBubbleProps = {
|
9
|
-
message: ChatMessage;
|
12
|
+
message: ChatMessage | /* @conditional-compile-remove(data-loss-prevention) */ BlockedMessage;
|
10
13
|
messageContainerStyle?: ComponentSlotStyle;
|
11
14
|
/** Styles for message status indicator container. */
|
12
15
|
messageStatusContainer?: (mine: boolean) => IStyle;
|
@@ -51,6 +54,24 @@ declare type ChatMessageComponentAsMessageBubbleProps = {
|
|
51
54
|
* @beta
|
52
55
|
*/
|
53
56
|
onDisplayDateTimeString?: (messageDate: Date) => string;
|
57
|
+
/**
|
58
|
+
* Optional props needed to display suggestions in the mention scenario.
|
59
|
+
* @internal
|
60
|
+
*/
|
61
|
+
mentionDisplayOptions?: MentionDisplayOptions;
|
62
|
+
/**
|
63
|
+
* Optional function to fetch attachments.
|
64
|
+
*/
|
65
|
+
onFetchAttachments?: (attachment: FileMetadata) => Promise<void>;
|
66
|
+
/**
|
67
|
+
* Optional callback called when an inline image is clicked.
|
68
|
+
* @beta
|
69
|
+
*/
|
70
|
+
onInlineImageClicked?: (attachmentId: string, messageId: string) => Promise<void>;
|
71
|
+
/**
|
72
|
+
* Optional map of attachment ids to blob urls.
|
73
|
+
*/
|
74
|
+
attachmentsMap?: Record<string, string>;
|
54
75
|
};
|
55
76
|
/** @private */
|
56
77
|
export declare const ChatMessageComponentAsMessageBubble: React.MemoExoticComponent<(props: ChatMessageComponentAsMessageBubbleProps) => JSX.Element>;
|
@@ -1,5 +1,14 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
4
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
5
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
6
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
7
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
8
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
9
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
10
|
+
});
|
11
|
+
};
|
3
12
|
import { Text, mergeStyles } from '@fluentui/react';
|
4
13
|
import { ChatMessage as FluentChatMessage, ChatMyMessage } from '@fluentui-contrib/react-chat';
|
5
14
|
import React, { useCallback, useRef, useState } from 'react';
|
@@ -9,6 +18,8 @@ import { useIdentifiers } from '../../identifiers/IdentifierProvider';
|
|
9
18
|
import { useTheme } from '../../theming';
|
10
19
|
import { ChatMessageActionFlyout } from './ChatMessageActionsFlyout';
|
11
20
|
import { ChatMessageContent } from './ChatMessageContent';
|
21
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
22
|
+
import { BlockedMessageContent } from './ChatMessageContent';
|
12
23
|
import { chatMessageActionMenuProps } from './ChatMessageActionMenu';
|
13
24
|
import { _FileDownloadCards } from '../FileDownloadCards';
|
14
25
|
import { useLocale } from '../../localization';
|
@@ -21,6 +32,8 @@ const generateDefaultTimestamp = (createdOn, showDate, strings) => {
|
|
21
32
|
};
|
22
33
|
// onDisplayDateTimeString from props overwrite onDisplayDateTimeString from locale
|
23
34
|
const generateCustomizedTimestamp = (props, createdOn, locale) => {
|
35
|
+
/* @conditional-compile-remove(date-time-customization) */
|
36
|
+
return props.onDisplayDateTimeString ? props.onDisplayDateTimeString(createdOn) : locale.onDisplayDateTimeString ? locale.onDisplayDateTimeString(createdOn) : '';
|
24
37
|
return '';
|
25
38
|
};
|
26
39
|
/** @private */
|
@@ -29,7 +42,9 @@ const MessageBubble = (props) => {
|
|
29
42
|
const ids = useIdentifiers();
|
30
43
|
const theme = useTheme();
|
31
44
|
const locale = useLocale();
|
32
|
-
const { userId, message, onRemoveClick, onResendClick, disableEditing, showDate, messageContainerStyle, strings, onEditClick, remoteParticipantsCount = 0, onRenderAvatar, showMessageStatus, messageStatus, fileDownloadHandler,
|
45
|
+
const { userId, message, onRemoveClick, onResendClick, disableEditing, showDate, messageContainerStyle, strings, onEditClick, remoteParticipantsCount = 0, onRenderAvatar, showMessageStatus, messageStatus, fileDownloadHandler,
|
46
|
+
/* @conditional-compile-remove(image-gallery) */
|
47
|
+
onInlineImageClicked, shouldOverlapAvatarAndMessage } = props;
|
33
48
|
const defaultTimeStamp = message.createdOn ? generateDefaultTimestamp(message.createdOn, showDate, strings) : undefined;
|
34
49
|
const customTimestamp = message.createdOn ? generateCustomizedTimestamp(props, message.createdOn, locale) : '';
|
35
50
|
const formattedTimestamp = customTimestamp || defaultTimeStamp;
|
@@ -43,7 +58,7 @@ const MessageBubble = (props) => {
|
|
43
58
|
const messageRef = useRef(null);
|
44
59
|
const messageActionButtonRef = useRef(null);
|
45
60
|
const [chatMessageActionFlyoutTarget, setChatMessageActionFlyoutTarget] = useState(undefined);
|
46
|
-
const chatActionsEnabled = !disableEditing && message.status !== 'sending' && !!message.mine;
|
61
|
+
const chatActionsEnabled = !disableEditing && message.status !== 'sending' && !!message.mine && /* @conditional-compile-remove(data-loss-prevention) */ message.messageType !== 'blocked';
|
47
62
|
const [messageReadBy, setMessageReadBy] = useState([]);
|
48
63
|
const actionMenuProps = chatMessageActionMenuProps({
|
49
64
|
ariaLabel: (_a = strings.actionMenuMoreOptions) !== null && _a !== void 0 ? _a : '',
|
@@ -64,7 +79,12 @@ const MessageBubble = (props) => {
|
|
64
79
|
// or not we need to set the target to undefined here to actually hide the action flyout
|
65
80
|
setChatMessageActionFlyoutTarget(undefined);
|
66
81
|
}, [setChatMessageActionFlyoutTarget]);
|
67
|
-
const defaultOnRenderFileDownloads = useCallback(() => React.createElement(_FileDownloadCards, { userId: userId, fileMetadata: message['attachedFilesMetadata'] || [], downloadHandler: fileDownloadHandler
|
82
|
+
const defaultOnRenderFileDownloads = useCallback(() => React.createElement(_FileDownloadCards, { userId: userId, fileMetadata: message['attachedFilesMetadata'] || [], downloadHandler: fileDownloadHandler,
|
83
|
+
/* @conditional-compile-remove(file-sharing) @conditional-compile-remove(teams-inline-images-and-file-sharing)*/ strings: {
|
84
|
+
downloadFile: strings.downloadFile,
|
85
|
+
fileCardGroupMessage: strings.fileCardGroupMessage
|
86
|
+
} }), [userId, message,
|
87
|
+
strings, fileDownloadHandler]);
|
68
88
|
const editedOn = 'editedOn' in message ? message.editedOn : undefined;
|
69
89
|
const getMessageDetails = useCallback(() => {
|
70
90
|
if (messageStatus === 'failed') {
|
@@ -75,12 +95,29 @@ const MessageBubble = (props) => {
|
|
75
95
|
}
|
76
96
|
return undefined;
|
77
97
|
}, [editedOn, message.messageType, messageStatus, strings.editedTag, strings.failToSendTag, theme]);
|
98
|
+
/* @conditional-compile-remove(image-gallery) */
|
99
|
+
const handleOnInlineImageClicked = useCallback((attachmentId) => __awaiter(void 0, void 0, void 0, function* () {
|
100
|
+
if (onInlineImageClicked === undefined) {
|
101
|
+
return;
|
102
|
+
}
|
103
|
+
yield onInlineImageClicked(attachmentId, message.messageId);
|
104
|
+
}), [message, onInlineImageClicked]);
|
78
105
|
const getContent = useCallback(() => {
|
106
|
+
/* @conditional-compile-remove(data-loss-prevention) */
|
107
|
+
if (message.messageType === 'blocked') {
|
108
|
+
return React.createElement("div", { tabIndex: 0 },
|
109
|
+
React.createElement(BlockedMessageContent, { message: message, strings: strings }));
|
110
|
+
}
|
79
111
|
return React.createElement("div", { tabIndex: 0, className: "ui-chat__message__content" },
|
80
|
-
React.createElement(ChatMessageContent, { message: message, strings: strings
|
112
|
+
React.createElement(ChatMessageContent, { message: message, strings: strings,
|
113
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ onFetchAttachment: props.onFetchAttachments,
|
114
|
+
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */ attachmentsMap: props.attachmentsMap,
|
115
|
+
/* @conditional-compile-remove(mention) */ mentionDisplayOptions: props.mentionDisplayOptions,
|
116
|
+
/* @conditional-compile-remove(image-gallery) */ onInlineImageClicked: handleOnInlineImageClicked }),
|
81
117
|
props.onRenderFileDownloads ? props.onRenderFileDownloads(userId, message) : defaultOnRenderFileDownloads());
|
82
|
-
}, [defaultOnRenderFileDownloads, message, props, strings, userId
|
83
|
-
|
118
|
+
}, [defaultOnRenderFileDownloads, message, props, strings, userId,
|
119
|
+
handleOnInlineImageClicked]);
|
120
|
+
const isBlockedMessage = false || /* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked';
|
84
121
|
const chatMyMessageStyles = useChatMyMessageStyles();
|
85
122
|
const chatMessageCommonStyles = useChatMessageCommonStyles();
|
86
123
|
const chatMessageStyles = useChatMessageStyles();
|
@@ -92,11 +129,7 @@ const MessageBubble = (props) => {
|
|
92
129
|
React.createElement("div", { key: props.message.messageId, ref: messageRef }, message.mine ? React.createElement(ChatMyMessage, { attached: attached, key: props.message.messageId, body: {
|
93
130
|
// messageContainerStyle used in className and style prop as style prop can't handle CSS selectors
|
94
131
|
className: mergeClasses(chatMyMessageStyles.body, isBlockedMessage ? chatMessageCommonStyles.blocked : props.message.status === 'failed' ? chatMessageCommonStyles.failed : undefined, attached !== 'top' ? chatMyMessageStyles.bodyAttached : undefined, mergeStyles(messageContainerStyle)),
|
95
|
-
style: Object.assign({}, createStyleFromV8Style(messageContainerStyle))
|
96
|
-
// make body not focusable to remove repetitions from narrators.
|
97
|
-
// inner components are already focusable
|
98
|
-
tabIndex: -1,
|
99
|
-
role: 'presentation'
|
132
|
+
style: Object.assign({}, createStyleFromV8Style(messageContainerStyle))
|
100
133
|
}, root: {
|
101
134
|
className: chatMyMessageStyles.root,
|
102
135
|
onBlur: e => {
|
@@ -117,6 +150,7 @@ const MessageBubble = (props) => {
|
|
117
150
|
role: 'none',
|
118
151
|
tabIndex: -1
|
119
152
|
}, "data-ui-id": "chat-composite-message", author: React.createElement(Text, { className: chatMessageDateStyle, tabIndex: 0 }, message.senderDisplayName), timestamp: React.createElement(Text, { className: chatMessageDateStyle, "data-ui-id": ids.messageTimestamp, tabIndex: 0 }, formattedTimestamp), details: getMessageDetails(), actions: {
|
153
|
+
tabIndex: 0,
|
120
154
|
children: actionMenuProps === null || actionMenuProps === void 0 ? void 0 : actionMenuProps.children,
|
121
155
|
className: mergeClasses(chatMyMessageStyles.menu,
|
122
156
|
// Make actions menu visible when the message is focused or the flyout is shown
|
@@ -135,14 +169,14 @@ const MessageBubble = (props) => {
|
|
135
169
|
props.onActionButtonClick(message, setMessageReadBy);
|
136
170
|
}
|
137
171
|
} }, getContent()) : React.createElement(FluentChatMessage, { attached: attached, key: props.message.messageId, root: {
|
138
|
-
className: chatMessageStyles.root
|
139
|
-
}, author: React.createElement(Text, { className: chatMessageAuthorStyle }, message.senderDisplayName), body: {
|
140
|
-
className: chatItemMessageContainerClassName,
|
141
|
-
style: Object.assign({}, createStyleFromV8Style(messageContainerStyle)),
|
172
|
+
className: chatMessageStyles.root,
|
142
173
|
// make body not focusable to remove repetitions from narrators.
|
143
174
|
// inner components are already focusable
|
144
175
|
tabIndex: -1,
|
145
176
|
role: 'none'
|
177
|
+
}, author: React.createElement(Text, { className: chatMessageAuthorStyle }, message.senderDisplayName), body: {
|
178
|
+
className: chatItemMessageContainerClassName,
|
179
|
+
style: Object.assign({}, createStyleFromV8Style(messageContainerStyle))
|
146
180
|
}, "data-ui-id": "chat-composite-message", timestamp: React.createElement(Text, { className: chatMessageDateStyle, "data-ui-id": ids.messageTimestamp }, formattedTimestamp) }, getContent())),
|
147
181
|
chatActionsEnabled && React.createElement(ChatMessageActionFlyout, { hidden: !chatMessageActionFlyoutTarget, target: chatMessageActionFlyoutTarget, increaseFlyoutItemSize: wasInteractionByTouch, onDismiss: onActionFlyoutDismiss, onEditClick: onEditClick, onRemoveClick: onRemoveClick, onResendClick: onResendClick, strings: strings, messageReadBy: messageReadBy, messageStatus: messageStatus !== null && messageStatus !== void 0 ? messageStatus : 'failed', remoteParticipantsCount: remoteParticipantsCount, onRenderAvatar: onRenderAvatar, showMessageStatus: showMessageStatus }));
|
148
182
|
return chatMessage;
|