@azure/communication-react 1.17.0-alpha-202406020014 → 1.17.0-alpha-202406050014
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 +7 -8
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BQpOd_cF.js → ChatMessageComponentAsRichTextEditBox-CueWJlOs.js} +12 -12
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CueWJlOs.js.map +1 -0
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CBQNEhRD.js → RichTextSendBoxWrapper-DORQ6cdT.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CBQNEhRD.js.map → RichTextSendBoxWrapper-DORQ6cdT.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-xYWFdTrM.js → index-B4rHuheV.js} +240 -216
- package/dist/dist-cjs/communication-react/index-B4rHuheV.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/common.d.ts +1 -1
- package/dist/dist-esm/acs-ui-common/src/common.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/chat-component-bindings/src/handlers/createHandlers.d.ts +1 -1
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js +4 -4
- package/dist/dist-esm/chat-component-bindings/src/handlers/createHandlers.js.map +1 -1
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js +6 -6
- package/dist/dist-esm/chat-component-bindings/src/messageThreadSelector.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +4 -2
- package/dist/dist-esm/communication-react/src/index.js +1 -1
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js +30 -13
- package/dist/dist-esm/react-components/src/components/Attachment/AttachmentDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +4 -4
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js +9 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js +7 -7
- package/dist/dist-esm/react-components/src/components/ChatMessage/MessageComponents/FluentChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js +12 -12
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsEditBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +14 -14
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.d.ts +2 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js +5 -5
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js +9 -9
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMyMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js +10 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/FluentChatMyMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.js +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageThread.js +4 -4
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +6 -7
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +32 -32
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js +6 -6
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBoxErrors.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/SendBox.js +22 -22
- package/dist/dist-esm/react-components/src/components/SendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js +5 -3
- package/dist/dist-esm/react-components/src/components/styles/AttachmentCardGroup.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +2 -2
- package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js +7 -7
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentAsEditBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js +10 -9
- package/dist/dist-esm/react-components/src/components/utils/ChatMessageComponentUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js +4 -4
- package/dist/dist-esm/react-components/src/components/utils/SendBoxUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/common.js +2 -2
- package/dist/dist-esm/react-components/src/components/utils/common.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +8 -6
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/Attachment.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +0 -1
- package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +2 -2
- 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 +2 -2
- 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/CallWithChatBackedChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatComposite.js +4 -4
- 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 +30 -26
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- 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 +2 -2
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +7 -7
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +2 -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/file-sharing/AttachmentUpload.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUpload.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js +11 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/AttachmentUploadButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/file-sharing/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js +4 -4
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/SendBoxPicker.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/package.json +2 -2
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-BQpOd_cF.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-xYWFdTrM.js.map +0 -1
@@ -14,17 +14,17 @@ import { ChatScreen } from './ChatScreen';
|
|
14
14
|
*/
|
15
15
|
export const ChatComposite = (props) => {
|
16
16
|
const { adapter, options, onFetchAvatarPersonaData, onRenderTypingIndicator, onRenderMessage, onFetchParticipantMenuItems } = props;
|
17
|
-
/* @conditional-compile-remove(
|
17
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
18
18
|
const formFactor = props['formFactor'] || 'desktop';
|
19
19
|
return (React.createElement("div", { className: chatScreenContainerStyle },
|
20
20
|
React.createElement(BaseProvider, Object.assign({}, props),
|
21
21
|
React.createElement(ChatAdapterProvider, { adapter: adapter },
|
22
22
|
React.createElement(ChatScreen
|
23
|
-
/* @conditional-compile-remove(
|
23
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
24
24
|
, {
|
25
|
-
/* @conditional-compile-remove(
|
25
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
26
26
|
formFactor: formFactor, options: options, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onRenderTypingIndicator: onRenderTypingIndicator, onRenderMessage: onRenderMessage, onFetchParticipantMenuItems: onFetchParticipantMenuItems,
|
27
|
-
/* @conditional-compile-remove(
|
27
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28
28
|
attachmentOptions: options === null || options === void 0 ? void 0 : options.attachmentOptions })))));
|
29
29
|
};
|
30
30
|
//# sourceMappingURL=ChatComposite.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatComposite.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/ChatComposite/ChatComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAsB,MAAM,yBAAyB,CAAC;AAG3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAuF1C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAe,EAAE;IACtE,MAAM,EACJ,OAAO,EACP,OAAO,EACP,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,EACf,2BAA2B,EAC5B,GAAG,KAAK,CAAC;IAEV,
|
1
|
+
{"version":3,"file":"ChatComposite.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/ChatComposite/ChatComposite.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAsB,MAAM,yBAAyB,CAAC;AAG3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAuF1C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAe,EAAE;IACtE,MAAM,EACJ,OAAO,EACP,OAAO,EACP,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,EACf,2BAA2B,EAC5B,GAAG,KAAK,CAAC;IAEV,mDAAmD;IACnD,MAAM,UAAU,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,SAAS,CAAC;IAEpD,OAAO,CACL,6BAAK,SAAS,EAAE,wBAAwB;QACtC,oBAAC,YAAY,oBAAK,KAAK;YACrB,oBAAC,mBAAmB,IAAC,OAAO,EAAE,OAAO;gBACnC,oBAAC,UAAU;gBACT,mDAAmD;;oBAAnD,mDAAmD;oBACnD,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,wBAAwB,EAAE,wBAAwB,EAClD,uBAAuB,EAAE,uBAAuB,EAChD,eAAe,EAAE,eAAe,EAChC,2BAA2B,EAAE,2BAA2B;oBACxD,mDAAmD;oBACnD,iBAAiB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,GAC7C,CACkB,CACT,CACX,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommunicationParticipant, MessageRenderer, MessageProps } from '@internal/react-components';\nimport React from 'react';\nimport { BaseProvider, BaseCompositeProps } from '../common/BaseComposite';\nimport { ChatCompositeIcons } from '../common/icons';\nimport { ChatAdapter } from './adapter/ChatAdapter';\nimport { ChatAdapterProvider } from './adapter/ChatAdapterProvider';\nimport { chatScreenContainerStyle } from './styles/Chat.styles';\nimport { ChatScreen } from './ChatScreen';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentOptions } from '@internal/react-components';\n\n/**\n * Props for {@link ChatComposite}.\n *\n * @public\n */\nexport interface ChatCompositeProps extends BaseCompositeProps<ChatCompositeIcons> {\n /**\n * An adapter provides logic and data to the composite.\n * Composite can also be controlled using the adapter.\n */\n adapter: ChatAdapter;\n /**\n * `(messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element`\n * A callback for customizing the message renderer.\n */\n onRenderMessage?: (messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element;\n /**\n * `(typingUsers: CommunicationParticipant[]) => JSX.Element`\n * A callback for customizing the typing indicator renderer.\n */\n onRenderTypingIndicator?: (typingUsers: CommunicationParticipant[]) => JSX.Element;\n /**\n * Flags to enable/disable visual elements of the {@link ChatComposite}.\n */\n options?: ChatCompositeOptions;\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Optimizes the composite form factor for either desktop or mobile.\n * @remarks `mobile` is currently only optimized for Portrait mode on mobile devices and does not support landscape.\n * @defaultValue 'desktop'\n */\n formFactor?: 'desktop' | 'mobile';\n}\n\n/**\n * Optional features of the {@link ChatComposite}.\n *\n * @public\n */\nexport type ChatCompositeOptions = {\n /**\n * Surface Azure Communication Services backend errors in the UI with {@link @azure/communication-react#ErrorBar}.\n * Hide or show the error bar.\n * @defaultValue true\n */\n errorBar?: boolean;\n /* @conditional-compile-remove(chat-composite-participant-pane) */\n /**\n * Show or hide the participant pane. This feature is in beta and not supported on mobile or narrow screen views.\n * @defaultValue false\n *\n * @beta\n */\n participantPane?: boolean;\n /**\n * Show or hide the topic at the top of the chat. Hidden if set to `false`\n * @defaultValue true\n */\n topic?: boolean;\n /**\n * enumerable to determine if the input box has focus on render or not.\n * When undefined nothing has focus on render\n */\n autoFocus?: 'sendBoxTextField';\n\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Properties for configuring the File Sharing feature.\n * If undefined, file sharing feature will be disabled.\n * @beta\n */\n attachmentOptions?: AttachmentOptions;\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n /**\n * enables rich text editor for the edit box\n * @defaultValue `false`\n *\n * @beta\n */\n richTextEditor?: boolean;\n};\n\n/**\n * A customizable UI composite for the chat experience.\n *\n * @remarks Chat composite min width and height are respectively 17.5rem and 20rem (280px and 320px, with default rem at 16px)\n *\n * @public\n */\nexport const ChatComposite = (props: ChatCompositeProps): JSX.Element => {\n const {\n adapter,\n options,\n onFetchAvatarPersonaData,\n onRenderTypingIndicator,\n onRenderMessage,\n onFetchParticipantMenuItems\n } = props;\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const formFactor = props['formFactor'] || 'desktop';\n\n return (\n <div className={chatScreenContainerStyle}>\n <BaseProvider {...props}>\n <ChatAdapterProvider adapter={adapter}>\n <ChatScreen\n /* @conditional-compile-remove(file-sharing-acs) */\n formFactor={formFactor}\n options={options}\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onRenderTypingIndicator={onRenderTypingIndicator}\n onRenderMessage={onRenderMessage}\n onFetchParticipantMenuItems={onFetchParticipantMenuItems}\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentOptions={options?.attachmentOptions}\n />\n </ChatAdapterProvider>\n </BaseProvider>\n </div>\n );\n};\n"]}
|
@@ -14,13 +14,13 @@ import { mergeStyles, Stack } from '@fluentui/react';
|
|
14
14
|
import { PersonaSize } from '@fluentui/react';
|
15
15
|
import { ErrorBar, MessageThread, TypingIndicator, useTheme } from "../../../../react-components/src";
|
16
16
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
17
|
-
/* @conditional-compile-remove(
|
17
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
18
18
|
import { useReducer } from 'react';
|
19
19
|
import { useState } from 'react';
|
20
20
|
import { AvatarPersona } from '../common/AvatarPersona';
|
21
21
|
import { useAdapter } from './adapter/ChatAdapterProvider';
|
22
22
|
import { ChatHeader, getHeaderProps } from './ChatHeader';
|
23
|
-
/* @conditional-compile-remove(
|
23
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
24
24
|
import { AttachmentUploadButtonWrapper as AttachmentUploadButton } from './file-sharing';
|
25
25
|
import { useAdaptedSelector } from './hooks/useAdaptedSelector';
|
26
26
|
import { usePropsFor } from './hooks/usePropsFor';
|
@@ -29,13 +29,13 @@ import { participantListContainerPadding } from '../common/styles/ParticipantCon
|
|
29
29
|
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
30
30
|
import { ChatScreenPeoplePane } from './ChatScreenPeoplePane';
|
31
31
|
import { toFlatCommunicationIdentifier } from "../../../../acs-ui-common/src";
|
32
|
-
/* @conditional-compile-remove(
|
32
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
33
33
|
import { AttachmentDownloadErrorBar } from './AttachmentDownloadErrorBar';
|
34
34
|
import { _AttachmentDownloadCards } from "../../../../react-components/src";
|
35
35
|
import { ImageOverlay } from "../../../../react-components/src";
|
36
|
-
/* @conditional-compile-remove(
|
36
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
37
37
|
import { nanoid } from 'nanoid';
|
38
|
-
/* @conditional-compile-remove(
|
38
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
39
39
|
import { AttachmentUploadActionType, AttachmentUploadReducer } from './file-sharing/AttachmentUpload';
|
40
40
|
import { SendBoxPicker } from '../common/SendBoxPicker';
|
41
41
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
@@ -45,13 +45,15 @@ import { loadRichTextSendBox } from '../common/SendBoxPicker';
|
|
45
45
|
*/
|
46
46
|
export const ChatScreen = (props) => {
|
47
47
|
var _a, _b, _c, _d;
|
48
|
-
const { onFetchAvatarPersonaData, onRenderMessage, onRenderTypingIndicator, options, styles,
|
48
|
+
const { onFetchAvatarPersonaData, onRenderMessage, onRenderTypingIndicator, options, styles,
|
49
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
50
|
+
attachmentOptions, formFactor } = props;
|
49
51
|
const defaultNumberOfChatMessagesToReload = 5;
|
50
|
-
/* @conditional-compile-remove(
|
52
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
51
53
|
const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');
|
52
54
|
const [overlayImageItem, setOverlayImageItem] = useState();
|
53
55
|
const [isImageOverlayOpen, setIsImageOverlayOpen] = useState(false);
|
54
|
-
/* @conditional-compile-remove(
|
56
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
55
57
|
const [uploads, handleUploadAction] = useReducer(AttachmentUploadReducer, []);
|
56
58
|
const adapter = useAdapter();
|
57
59
|
const theme = useTheme();
|
@@ -120,7 +122,7 @@ export const ChatScreen = (props) => {
|
|
120
122
|
return Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.sendBox);
|
121
123
|
}, [styles === null || styles === void 0 ? void 0 : styles.sendBox]);
|
122
124
|
const userId = toFlatCommunicationIdentifier(adapter.getState().userId);
|
123
|
-
/* @conditional-compile-remove(
|
125
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
124
126
|
const attachmentUploadButtonOnChange = useCallback((files) => {
|
125
127
|
var _a;
|
126
128
|
if (!files) {
|
@@ -156,7 +158,7 @@ export const ChatScreen = (props) => {
|
|
156
158
|
handleUploadAction({ type: AttachmentUploadActionType.Set, newUploads });
|
157
159
|
(_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _a === void 0 ? void 0 : _a.handleAttachmentSelection(newUploads);
|
158
160
|
}, [attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions]);
|
159
|
-
/* @conditional-compile-remove(
|
161
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
160
162
|
const onRenderAttachmentDownloads = useCallback((message) => {
|
161
163
|
var _a, _b, _c;
|
162
164
|
return ((_b = (_a = message === null || message === void 0 ? void 0 : message.attachments) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0 > 0) ? (React.createElement(_AttachmentDownloadCards, { attachments: message.attachments, message: message, actionsForAttachment: (_c = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.downloadOptions) === null || _c === void 0 ? void 0 : _c.actionsForAttachment, onActionHandlerFailed: (errorMessage) => {
|
@@ -251,41 +253,39 @@ export const ChatScreen = (props) => {
|
|
251
253
|
document.body.removeChild(a);
|
252
254
|
}
|
253
255
|
}, [overlayImageItem === null || overlayImageItem === void 0 ? void 0 : overlayImageItem.attachmentId]);
|
256
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
254
257
|
const AttachmentButton = useCallback(() => {
|
255
258
|
var _a, _b, _c;
|
256
|
-
/* @conditional-compile-remove(attachment-upload) */
|
257
259
|
if (!((_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _a === void 0 ? void 0 : _a.handleAttachmentSelection)) {
|
258
260
|
return null;
|
259
261
|
}
|
260
|
-
/* @conditional-compile-remove(attachment-upload) */
|
261
262
|
return (React.createElement(AttachmentUploadButton, { supportedMediaTypes: (_b = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _b === void 0 ? void 0 : _b.supportedMediaTypes, disableMultipleUploads: (_c = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _c === void 0 ? void 0 : _c.disableMultipleUploads, onChange: attachmentUploadButtonOnChange }));
|
262
263
|
return React.createElement(React.Fragment, null);
|
263
264
|
}, [
|
264
265
|
(_b = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _b === void 0 ? void 0 : _b.handleAttachmentSelection,
|
265
266
|
(_c = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _c === void 0 ? void 0 : _c.supportedMediaTypes,
|
266
267
|
(_d = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _d === void 0 ? void 0 : _d.disableMultipleUploads,
|
267
|
-
/* @conditional-compile-remove(attachment-upload) */
|
268
268
|
attachmentUploadButtonOnChange
|
269
269
|
]);
|
270
|
-
/* @conditional-compile-remove(
|
270
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
271
271
|
const attachments = useMemo(() => {
|
272
272
|
return uploads === null || uploads === void 0 ? void 0 : uploads.map((v) => v.metadata);
|
273
273
|
}, [uploads]);
|
274
274
|
const onSendMessageHandler = useCallback(function (content,
|
275
|
-
/* @conditional-compile-remove(
|
275
|
+
/* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */ options) {
|
276
276
|
return __awaiter(this, void 0, void 0, function* () {
|
277
277
|
var _a;
|
278
|
-
/* @conditional-compile-remove(
|
278
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
279
279
|
const attachments = (_a = options === null || options === void 0 ? void 0 : options.attachments) !== null && _a !== void 0 ? _a : [];
|
280
|
-
/* @conditional-compile-remove(
|
280
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
281
281
|
handleUploadAction({ type: AttachmentUploadActionType.Clear });
|
282
|
-
/* @conditional-compile-remove(
|
282
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
283
283
|
yield adapter.sendMessage(content, {
|
284
284
|
attachments: attachments,
|
285
285
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
286
286
|
type: options === null || options === void 0 ? void 0 : options.type
|
287
287
|
});
|
288
|
-
/* @conditional-compile-remove(
|
288
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
289
289
|
return;
|
290
290
|
yield adapter.sendMessage(content, {
|
291
291
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
@@ -293,7 +293,7 @@ export const ChatScreen = (props) => {
|
|
293
293
|
});
|
294
294
|
});
|
295
295
|
}, [adapter]);
|
296
|
-
/* @conditional-compile-remove(
|
296
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
297
297
|
const onCancelUploadHandler = useCallback((id) => {
|
298
298
|
var _a, _b;
|
299
299
|
handleUploadAction({ type: AttachmentUploadActionType.Remove, id });
|
@@ -304,32 +304,36 @@ export const ChatScreen = (props) => {
|
|
304
304
|
React.createElement(Stack, { className: chatArea, tokens: participantListContainerPadding, horizontal: true, grow: true },
|
305
305
|
React.createElement(Stack, { className: chatWrapper, grow: true },
|
306
306
|
(options === null || options === void 0 ? void 0 : options.errorBar) !== false && React.createElement(ErrorBar, Object.assign({}, errorBarProps)),
|
307
|
-
/* @conditional-compile-remove(
|
307
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
308
308
|
React.createElement(AttachmentDownloadErrorBar, { onDismissDownloadErrorMessage: useCallback(() => {
|
309
309
|
setDownloadErrorMessage('');
|
310
310
|
}, []), attachmentDownloadErrorMessage: downloadErrorMessage || '' }),
|
311
311
|
React.createElement(MessageThread, Object.assign({}, messageThreadProps, { onRenderAvatar: onRenderAvatarCallback, onRenderMessage: onRenderMessage,
|
312
|
-
/* @conditional-compile-remove(
|
312
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
313
313
|
onRenderAttachmentDownloads: onRenderAttachmentDownloads, inlineImageOptions: inlineImageOptions, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles,
|
314
314
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
315
315
|
richTextEditor: options === null || options === void 0 ? void 0 : options.richTextEditor })),
|
316
316
|
React.createElement(Stack, { className: mergeStyles(sendboxContainerStyles) },
|
317
317
|
React.createElement("div", { className: mergeStyles(typingIndicatorContainerStyles) }, onRenderTypingIndicator ? (onRenderTypingIndicator(typingIndicatorProps.typingUsers)) : (React.createElement(TypingIndicator, Object.assign({}, typingIndicatorProps, { styles: typingIndicatorStyles })))),
|
318
318
|
React.createElement(Stack, { horizontal: formFactor === 'mobile' },
|
319
|
-
formFactor === 'mobile' && (
|
319
|
+
formFactor === 'mobile' && (
|
320
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
321
|
+
React.createElement(Stack, { verticalAlign: "center" },
|
320
322
|
React.createElement(AttachmentButton, null))),
|
321
323
|
React.createElement(Stack, { grow: true },
|
322
324
|
React.createElement(SendBoxPicker, { styles: sendBoxStyles, autoFocus: options === null || options === void 0 ? void 0 : options.autoFocus,
|
323
325
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
324
326
|
richTextEditor: options === null || options === void 0 ? void 0 : options.richTextEditor,
|
325
|
-
/* @conditional-compile-remove(
|
327
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
326
328
|
attachments: attachments,
|
327
|
-
/* @conditional-compile-remove(
|
329
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
328
330
|
onCancelAttachmentUpload: onCancelUploadHandler,
|
329
331
|
// we need to overwrite onSendMessage for SendBox because we need to clear attachment state
|
330
332
|
// when submit button is clicked
|
331
333
|
onSendMessage: onSendMessageHandler })),
|
332
|
-
formFactor !== 'mobile' &&
|
334
|
+
formFactor !== 'mobile' && (
|
335
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
336
|
+
React.createElement(AttachmentButton, null))))),
|
333
337
|
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
334
338
|
(options === null || options === void 0 ? void 0 : options.participantPane) === true && (React.createElement(ChatScreenPeoplePane, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, isMobile: formFactor === 'mobile' }))),
|
335
339
|
overlayImageItem && (React.createElement(ImageOverlay, Object.assign({}, overlayImageItem, { isOpen: isImageOverlayOpen, onDismiss: () => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatScreen.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/ChatComposite/ChatScreen.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAEL,QAAQ,EAGR,aAAa,EAIb,eAAe,EAEf,QAAQ,EACT,yCAAmC;AAGpC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC/D,oDAAoD;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,aAAa,EAAiD,MAAM,yBAAyB,CAAC;AACvG,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,oDAAoD;AACpD,OAAO,EAAE,6BAA6B,IAAI,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,gCAAgC,EAChC,sBAAsB,EACtB,8BAA8B,EAC/B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,+BAA+B,EAAE,MAAM,8CA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,EAAE,qBAAqB;gCAC/C,2FAA2F;gCAC3F,gCAAgC;gCAChC,aAAa,EAAE,oBAAoB,GACnC,CACI;wBACP,UAAU,KAAK,QAAQ,IAAI,oBAAC,gBAAgB,OAAG,CAC1C,CACF,CACF;YAEN,kEAAkE;YAClE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,MAAK,IAAI,IAAI,CACnC,oBAAC,oBAAoB,IACnB,wBAAwB,EAAE,wBAAwB,EAClD,2BAA2B,EAAE,KAAK,CAAC,2BAA2B,EAC9D,QAAQ,EAAE,UAAU,KAAK,QAAQ,GACjC,CACH,CAEG;QACP,gBAAgB,IAAI,CACnB,oBAAC,YAAY,oBACP,gBAAgB,IACpB,MAAM,EAAE,kBAAkB,EAC1B,SAAS,EAAE,GAAG,EAAE;gBACd,mBAAmB,CAAC,SAAS,CAAC,CAAC;gBAC/B,qBAAqB,CAAC,KAAK,CAAC,CAAC;gBAC7B,OAAO,CAAC,uBAAuB,CAAC;oBAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,QAAQ;oBAC5C,SAAS,EAAE,gBAAgB,CAAC,SAAS;oBACrC,WAAW,EAAE,gBAAgB,CAAC,QAAQ;iBACvC,CAAC,CAAC;YACL,CAAC,EACD,uBAAuB,EAAE,uBAAuB,IAChD,CACH,CACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { isIOS } from '@fluentui/react';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { PersonaSize } from '@fluentui/react';\nimport {\n CommunicationParticipant,\n ErrorBar,\n MessageProps,\n MessageRenderer,\n MessageThread,\n MessageThreadStyles,\n ParticipantMenuItemsCallback,\n SendBoxStylesProps,\n TypingIndicator,\n TypingIndicatorStylesProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { ChatMessage } from '@internal/react-components';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n/* @conditional-compile-remove(attachment-upload) */\nimport { useReducer } from 'react';\nimport { useState } from 'react';\nimport { AvatarPersona, AvatarPersonaDataCallback, AvatarPersonaProps } from '../common/AvatarPersona';\nimport { useAdapter } from './adapter/ChatAdapterProvider';\nimport { ChatCompositeOptions } from './ChatComposite';\nimport { ChatHeader, getHeaderProps } from './ChatHeader';\n/* @conditional-compile-remove(attachment-upload) */\nimport { AttachmentUploadButtonWrapper as AttachmentUploadButton } from './file-sharing';\nimport { useAdaptedSelector } from './hooks/useAdaptedSelector';\nimport { usePropsFor } from './hooks/usePropsFor';\n\nimport {\n chatArea,\n chatContainer,\n chatWrapper,\n messageThreadChatCompositeStyles,\n sendboxContainerStyles,\n typingIndicatorContainerStyles\n} from './styles/Chat.styles';\nimport { participantListContainerPadding } from '../common/styles/ParticipantContainer.styles';\n/* @conditional-compile-remove(chat-composite-participant-pane) */\nimport { ChatScreenPeoplePane } from './ChatScreenPeoplePane';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nimport { AttachmentDownloadErrorBar } from './AttachmentDownloadErrorBar';\nimport { _AttachmentDownloadCards } from '@internal/react-components';\nimport { ImageOverlay } from '@internal/react-components';\nimport { InlineImage } from '@internal/react-components';\nimport { ResourceFetchResult } from '@internal/chat-stateful-client';\nimport { AttachmentOptions } from '@internal/react-components';\n/* @conditional-compile-remove(attachment-upload) */\nimport { nanoid } from 'nanoid';\n/* @conditional-compile-remove(attachment-upload) */\nimport { AttachmentUploadActionType, AttachmentUpload, AttachmentUploadReducer } from './file-sharing/AttachmentUpload';\n/* @conditional-compile-remove(attachment-upload) */\nimport { MessageOptions } from '@internal/acs-ui-common';\nimport { SendBoxPicker } from '../common/SendBoxPicker';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { loadRichTextSendBox } from '../common/SendBoxPicker';\n\n/**\n * @private\n */\nexport type ChatScreenProps = {\n options?: ChatCompositeOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onRenderMessage?: (messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element;\n onRenderTypingIndicator?: (typingUsers: CommunicationParticipant[]) => JSX.Element;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n styles?: ChatScreenStyles;\n attachmentOptions?: AttachmentOptions;\n formFactor?: 'desktop' | 'mobile';\n};\n\n/**\n * @private\n */\nexport type ChatScreenStyles = {\n messageThread?: MessageThreadStyles;\n sendBox?: SendBoxStylesProps;\n typingIndicator?: TypingIndicatorStylesProps;\n};\n\n/**\n * @private\n */\ninterface OverlayImageItem {\n imageSrc: string;\n title: string;\n titleIcon: JSX.Element;\n attachmentId: string;\n messageId: string;\n imageUrl: string;\n}\n\n/**\n * @private\n */\nexport const ChatScreen = (props: ChatScreenProps): JSX.Element => {\n const {\n onFetchAvatarPersonaData,\n onRenderMessage,\n onRenderTypingIndicator,\n options,\n styles,\n attachmentOptions,\n formFactor\n } = props;\n\n const defaultNumberOfChatMessagesToReload = 5;\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');\n const [overlayImageItem, setOverlayImageItem] = useState<OverlayImageItem>();\n const [isImageOverlayOpen, setIsImageOverlayOpen] = useState<boolean>(false);\n /* @conditional-compile-remove(attachment-upload) */\n const [uploads, handleUploadAction] = useReducer(AttachmentUploadReducer, []);\n\n const adapter = useAdapter();\n const theme = useTheme();\n\n useEffect(() => {\n // Initial data should be always fetched by the composite(or external caller) instead of the adapter\n const fetchData: () => Promise<void> = async () => {\n // Fetch initial data for adapter\n await adapter.fetchInitialData();\n // Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.\n await adapter.loadPreviousChatMessages(defaultNumberOfChatMessagesToReload);\n };\n fetchData();\n }, [adapter]);\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n useEffect(() => {\n // if rich text editor is enabled, the rich text editor component should be loaded early for good UX\n if (options?.richTextEditor !== undefined && options.richTextEditor) {\n // this line is needed to load the Rooster JS dependencies early in the lifecycle\n // when the rich text editor is enabled\n loadRichTextSendBox();\n }\n }, [options?.richTextEditor]);\n\n const messageThreadProps = usePropsFor(MessageThread);\n const typingIndicatorProps = usePropsFor(TypingIndicator);\n const headerProps = useAdaptedSelector(getHeaderProps);\n const errorBarProps = usePropsFor(ErrorBar);\n\n useEffect(() => {\n if (overlayImageItem === undefined) {\n return;\n }\n const message = adapter.getState().thread.chatMessages[overlayImageItem.messageId];\n if (message === undefined) {\n return;\n }\n const resourceCache = message.resourceCache;\n if (overlayImageItem.imageSrc === '' && resourceCache && resourceCache[overlayImageItem.imageUrl]) {\n const fullSizeImageSrc = getResourceSourceUrl(resourceCache[overlayImageItem.imageUrl]);\n if (fullSizeImageSrc === undefined || fullSizeImageSrc === '' || overlayImageItem.imageSrc === fullSizeImageSrc) {\n return;\n }\n setOverlayImageItem({\n ...overlayImageItem,\n imageSrc: fullSizeImageSrc\n });\n }\n // Disable eslint because we are using the overlayImageItem in this effect but don't want to have it as a dependency, as it will cause an infinite loop.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [messageThreadProps.messages]);\n\n const getResourceSourceUrl = (result: ResourceFetchResult): string => {\n let src = '';\n if (result.error || !result.sourceUrl) {\n src = 'blob://';\n } else {\n src = result.sourceUrl;\n }\n\n return src;\n };\n\n const onRenderAvatarCallback = useCallback(\n (userId?: string, defaultOptions?: AvatarPersonaProps) => {\n return (\n <AvatarPersona\n userId={userId}\n hidePersonaDetails={true}\n {...defaultOptions}\n dataProvider={onFetchAvatarPersonaData}\n />\n );\n },\n [onFetchAvatarPersonaData]\n );\n\n const messageThreadStyles = useMemo(() => {\n return Object.assign(\n {},\n messageThreadChatCompositeStyles(theme.semanticColors.bodyBackground),\n styles?.messageThread\n );\n }, [styles?.messageThread, theme.semanticColors.bodyBackground]);\n\n const typingIndicatorStyles = useMemo(() => {\n return Object.assign({}, styles?.typingIndicator);\n }, [styles?.typingIndicator]);\n\n const sendBoxStyles = useMemo(() => {\n return Object.assign({}, styles?.sendBox);\n }, [styles?.sendBox]);\n\n const userId = toFlatCommunicationIdentifier(adapter.getState().userId);\n\n /* @conditional-compile-remove(attachment-upload) */\n const attachmentUploadButtonOnChange = useCallback(\n (files: FileList | null): void => {\n if (!files) {\n return;\n }\n\n // Get files, change to tasks, store locally and pass back to Contoso\n const newUploads = Array.from(files).map((file): AttachmentUpload => {\n const taskId = nanoid();\n return {\n file,\n taskId,\n metadata: {\n id: taskId,\n name: file.name,\n progress: 0\n },\n notifyUploadProgressChanged: (value: number) => {\n handleUploadAction({ type: AttachmentUploadActionType.Progress, taskId, progress: value });\n },\n notifyUploadCompleted: (id: string, url: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Completed, taskId, id, url });\n },\n notifyUploadFailed: (message: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Failed, taskId, message });\n // remove the failed upload task when error banner is auto dismissed after 10 seconds\n // so the banner won't be shown again on UI re-rendering.\n setTimeout(() => {\n handleUploadAction({ type: AttachmentUploadActionType.Remove, id: taskId });\n }, 10 * 1000);\n }\n };\n });\n\n handleUploadAction({ type: AttachmentUploadActionType.Set, newUploads });\n attachmentOptions?.uploadOptions?.handleAttachmentSelection(newUploads);\n },\n [attachmentOptions?.uploadOptions]\n );\n\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n const onRenderAttachmentDownloads = useCallback(\n (message: ChatMessage) =>\n message?.attachments?.length ?? 0 > 0 ? (\n <_AttachmentDownloadCards\n attachments={message.attachments}\n message={message}\n actionsForAttachment={attachmentOptions?.downloadOptions?.actionsForAttachment}\n onActionHandlerFailed={(errorMessage: string) => {\n setDownloadErrorMessage(errorMessage);\n }}\n />\n ) : (\n <></>\n ),\n [attachmentOptions?.downloadOptions?.actionsForAttachment]\n );\n\n const onInlineImageClicked = useCallback(\n (attachmentId: string, messageId: string) => {\n const message = adapter.getState().thread.chatMessages[messageId];\n const inlinedImages = message.content?.attachments?.filter((attachment) => {\n return attachment.attachmentType === 'image' && attachment.id === attachmentId;\n });\n\n if (!inlinedImages || inlinedImages.length <= 0) {\n return;\n }\n\n const attachment = inlinedImages[0];\n\n const resourceCache = message.resourceCache;\n let imageSrc = '';\n\n if (attachment.url) {\n if (resourceCache && resourceCache[attachment.url]) {\n imageSrc = getResourceSourceUrl(resourceCache[attachment.url]);\n } else {\n adapter.downloadResourceToCache({\n threadId: adapter.getState().thread.threadId,\n messageId: messageId,\n resourceUrl: attachment.url\n });\n }\n }\n\n const titleIconRenderOptions = {\n text: message.senderDisplayName,\n size: PersonaSize.size32,\n showOverflowTooltip: false,\n imageAlt: message.senderDisplayName\n };\n\n const messageSenderId = message.sender !== undefined ? toFlatCommunicationIdentifier(message.sender) : userId;\n const titleIcon = onRenderAvatarCallback && onRenderAvatarCallback(messageSenderId, titleIconRenderOptions);\n const overlayImage: OverlayImageItem = {\n title: message.senderDisplayName || '',\n titleIcon: titleIcon,\n attachmentId: attachment.id,\n imageSrc: imageSrc,\n messageId: messageId,\n imageUrl: attachment.url || ''\n };\n\n setIsImageOverlayOpen(true);\n setOverlayImageItem(overlayImage);\n },\n [adapter, onRenderAvatarCallback, userId]\n );\n\n const onRenderInlineImage = useCallback(\n (inlineImage: InlineImage, defaultOnRender: (inlineImage: InlineImage) => JSX.Element): JSX.Element => {\n const message = adapter.getState().thread.chatMessages[inlineImage.messageId];\n const attachment = message?.content?.attachments?.find(\n (attachment) => attachment.id === inlineImage.imageAttributes.id\n );\n\n if (attachment === undefined) {\n return defaultOnRender(inlineImage);\n }\n\n let pointerEvents: 'none' | 'auto' = inlineImage.imageAttributes.src === '' ? 'none' : 'auto';\n const resourceCache = message.resourceCache;\n if (\n resourceCache &&\n attachment.previewUrl &&\n resourceCache[attachment.previewUrl] &&\n resourceCache[attachment.previewUrl].error\n ) {\n pointerEvents = 'none';\n }\n\n return (\n <span\n key={inlineImage.imageAttributes.id}\n onClick={() => onInlineImageClicked(inlineImage.imageAttributes.id || '', inlineImage.messageId)}\n tabIndex={0}\n role=\"button\"\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n onInlineImageClicked(inlineImage.imageAttributes.id || '', inlineImage.messageId);\n }\n }}\n style={{ cursor: 'pointer', pointerEvents }}\n >\n {defaultOnRender(inlineImage)}\n </span>\n );\n },\n [adapter, onInlineImageClicked]\n );\n\n const inlineImageOptions = useMemo(() => {\n return { onRenderInlineImage: onRenderInlineImage };\n }, [onRenderInlineImage]);\n\n const onDownloadButtonClicked = useCallback(\n (imageSrc: string): void => {\n if (imageSrc === '') {\n return;\n }\n if (isIOS()) {\n window.open(imageSrc, '_blank');\n } else {\n // Create a new anchor element\n const a = document.createElement('a');\n // Set the href and download attributes for the anchor element\n a.href = imageSrc;\n a.download = overlayImageItem?.attachmentId || '';\n a.rel = 'noopener noreferrer';\n a.target = '_blank';\n\n // Programmatically click the anchor element to trigger the download\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n }\n },\n [overlayImageItem?.attachmentId]\n );\n\n const AttachmentButton = useCallback(() => {\n /* @conditional-compile-remove(attachment-upload) */\n if (!attachmentOptions?.uploadOptions?.handleAttachmentSelection) {\n return null;\n }\n /* @conditional-compile-remove(attachment-upload) */\n return (\n <AttachmentUploadButton\n supportedMediaTypes={attachmentOptions?.uploadOptions?.supportedMediaTypes}\n disableMultipleUploads={attachmentOptions?.uploadOptions?.disableMultipleUploads}\n onChange={attachmentUploadButtonOnChange}\n />\n );\n return <></>;\n }, [\n attachmentOptions?.uploadOptions?.handleAttachmentSelection,\n attachmentOptions?.uploadOptions?.supportedMediaTypes,\n attachmentOptions?.uploadOptions?.disableMultipleUploads,\n /* @conditional-compile-remove(attachment-upload) */\n attachmentUploadButtonOnChange\n ]);\n\n /* @conditional-compile-remove(attachment-upload) */\n const attachments = useMemo(() => {\n return uploads?.map((v) => v.metadata);\n }, [uploads]);\n\n const onSendMessageHandler = useCallback(\n async function (\n content: string,\n /* @conditional-compile-remove(attachment-upload) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */ options?: MessageOptions\n ) {\n /* @conditional-compile-remove(attachment-upload) */\n const attachments = options?.attachments ?? [];\n /* @conditional-compile-remove(attachment-upload) */\n handleUploadAction({ type: AttachmentUploadActionType.Clear });\n /* @conditional-compile-remove(attachment-upload) */\n await adapter.sendMessage(content, {\n attachments: attachments,\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n type: options?.type\n });\n /* @conditional-compile-remove(attachment-upload) */\n return;\n await adapter.sendMessage(content, {\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n type: options?.type\n });\n },\n [adapter]\n );\n\n /* @conditional-compile-remove(attachment-upload) */\n const onCancelUploadHandler = useCallback(\n (id: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Remove, id });\n attachmentOptions?.uploadOptions?.handleAttachmentRemoval?.(id);\n },\n [attachmentOptions?.uploadOptions]\n );\n return (\n <Stack className={chatContainer} grow>\n {options?.topic !== false && <ChatHeader {...headerProps} />}\n <Stack className={chatArea} tokens={participantListContainerPadding} horizontal grow>\n <Stack className={chatWrapper} grow>\n {options?.errorBar !== false && <ErrorBar {...errorBarProps} />}\n {\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n <AttachmentDownloadErrorBar\n onDismissDownloadErrorMessage={useCallback(() => {\n setDownloadErrorMessage('');\n }, [])}\n attachmentDownloadErrorMessage={downloadErrorMessage || ''}\n />\n }\n <MessageThread\n {...messageThreadProps}\n onRenderAvatar={onRenderAvatarCallback}\n onRenderMessage={onRenderMessage}\n /* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\n onRenderAttachmentDownloads={onRenderAttachmentDownloads}\n inlineImageOptions={inlineImageOptions}\n numberOfChatMessagesToReload={defaultNumberOfChatMessagesToReload}\n styles={messageThreadStyles}\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n richTextEditor={options?.richTextEditor}\n />\n <Stack className={mergeStyles(sendboxContainerStyles)}>\n <div className={mergeStyles(typingIndicatorContainerStyles)}>\n {onRenderTypingIndicator ? (\n onRenderTypingIndicator(typingIndicatorProps.typingUsers)\n ) : (\n <TypingIndicator {...typingIndicatorProps} styles={typingIndicatorStyles} />\n )}\n </div>\n <Stack horizontal={formFactor === 'mobile'}>\n {formFactor === 'mobile' && (\n <Stack verticalAlign=\"center\">\n <AttachmentButton />\n </Stack>\n )}\n <Stack grow>\n <SendBoxPicker\n styles={sendBoxStyles}\n autoFocus={options?.autoFocus}\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n richTextEditor={options?.richTextEditor}\n /* @conditional-compile-remove(attachment-upload) */\n attachments={attachments}\n /* @conditional-compile-remove(attachment-upload) */\n onCancelAttachmentUpload={onCancelUploadHandler}\n // we need to overwrite onSendMessage for SendBox because we need to clear attachment state\n // when submit button is clicked\n onSendMessage={onSendMessageHandler}\n />\n </Stack>\n {formFactor !== 'mobile' && <AttachmentButton />}\n </Stack>\n </Stack>\n </Stack>\n {\n /* @conditional-compile-remove(chat-composite-participant-pane) */\n options?.participantPane === true && (\n <ChatScreenPeoplePane\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n isMobile={formFactor === 'mobile'}\n />\n )\n }\n </Stack>\n {overlayImageItem && (\n <ImageOverlay\n {...overlayImageItem}\n isOpen={isImageOverlayOpen}\n onDismiss={() => {\n setOverlayImageItem(undefined);\n setIsImageOverlayOpen(false);\n adapter.removeResourceFromCache({\n threadId: adapter.getState().thread.threadId,\n messageId: overlayImageItem.messageId,\n resourceUrl: overlayImageItem.imageUrl\n });\n }}\n onDownloadButtonClicked={onDownloadButtonClicked}\n />\n )}\n </Stack>\n );\n};\n"]}
|
1
|
+
{"version":3,"file":"ChatScreen.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/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AAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,MAAK,IAAI,IAAI,CACnC,oBAAC,oBAAoB,IACnB,wBAAwB,EAAE,wBAAwB,EAClD,2BAA2B,EAAE,KAAK,CAAC,2BAA2B,EAC9D,QAAQ,EAAE,UAAU,KAAK,QAAQ,GACjC,CACH,CAEG;QACP,gBAAgB,IAAI,CACnB,oBAAC,YAAY,oBACP,gBAAgB,IACpB,MAAM,EAAE,kBAAkB,EAC1B,SAAS,EAAE,GAAG,EAAE;gBACd,mBAAmB,CAAC,SAAS,CAAC,CAAC;gBAC/B,qBAAqB,CAAC,KAAK,CAAC,CAAC;gBAC7B,OAAO,CAAC,uBAAuB,CAAC;oBAC9B,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,QAAQ;oBAC5C,SAAS,EAAE,gBAAgB,CAAC,SAAS;oBACrC,WAAW,EAAE,gBAAgB,CAAC,QAAQ;iBACvC,CAAC,CAAC;YACL,CAAC,EACD,uBAAuB,EAAE,uBAAuB,IAChD,CACH,CACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { isIOS } from '@fluentui/react';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { PersonaSize } from '@fluentui/react';\nimport {\n CommunicationParticipant,\n ErrorBar,\n MessageProps,\n MessageRenderer,\n MessageThread,\n MessageThreadStyles,\n ParticipantMenuItemsCallback,\n SendBoxStylesProps,\n TypingIndicator,\n TypingIndicatorStylesProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { ChatMessage } from '@internal/react-components';\nimport React, { useCallback, useEffect, useMemo } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } from 'react';\nimport { useState } from 'react';\nimport { AvatarPersona, AvatarPersonaDataCallback, AvatarPersonaProps } from '../common/AvatarPersona';\nimport { useAdapter } from './adapter/ChatAdapterProvider';\nimport { ChatCompositeOptions } from './ChatComposite';\nimport { ChatHeader, getHeaderProps } from './ChatHeader';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentUploadButtonWrapper as AttachmentUploadButton } from './file-sharing';\nimport { useAdaptedSelector } from './hooks/useAdaptedSelector';\nimport { usePropsFor } from './hooks/usePropsFor';\n\nimport {\n chatArea,\n chatContainer,\n chatWrapper,\n messageThreadChatCompositeStyles,\n sendboxContainerStyles,\n typingIndicatorContainerStyles\n} from './styles/Chat.styles';\nimport { participantListContainerPadding } from '../common/styles/ParticipantContainer.styles';\n/* @conditional-compile-remove(chat-composite-participant-pane) */\nimport { ChatScreenPeoplePane } from './ChatScreenPeoplePane';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentDownloadErrorBar } from './AttachmentDownloadErrorBar';\nimport { _AttachmentDownloadCards } from '@internal/react-components';\nimport { ImageOverlay } from '@internal/react-components';\nimport { InlineImage } from '@internal/react-components';\nimport { ResourceFetchResult } from '@internal/chat-stateful-client';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentOptions } from '@internal/react-components';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { nanoid } from 'nanoid';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentUploadActionType, AttachmentUpload, AttachmentUploadReducer } from './file-sharing/AttachmentUpload';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { MessageOptions } from '@internal/acs-ui-common';\nimport { SendBoxPicker } from '../common/SendBoxPicker';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { loadRichTextSendBox } from '../common/SendBoxPicker';\n\n/**\n * @private\n */\nexport type ChatScreenProps = {\n options?: ChatCompositeOptions;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onRenderMessage?: (messageProps: MessageProps, defaultOnRender?: MessageRenderer) => JSX.Element;\n onRenderTypingIndicator?: (typingUsers: CommunicationParticipant[]) => JSX.Element;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n styles?: ChatScreenStyles;\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentOptions?: AttachmentOptions;\n formFactor?: 'desktop' | 'mobile';\n};\n\n/**\n * @private\n */\nexport type ChatScreenStyles = {\n messageThread?: MessageThreadStyles;\n sendBox?: SendBoxStylesProps;\n typingIndicator?: TypingIndicatorStylesProps;\n};\n\n/**\n * @private\n */\ninterface OverlayImageItem {\n imageSrc: string;\n title: string;\n titleIcon: JSX.Element;\n attachmentId: string;\n messageId: string;\n imageUrl: string;\n}\n\n/**\n * @private\n */\nexport const ChatScreen = (props: ChatScreenProps): JSX.Element => {\n const {\n onFetchAvatarPersonaData,\n onRenderMessage,\n onRenderTypingIndicator,\n options,\n styles,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentOptions,\n formFactor\n } = props;\n\n const defaultNumberOfChatMessagesToReload = 5;\n /* @conditional-compile-remove(file-sharing-acs) */\n const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');\n const [overlayImageItem, setOverlayImageItem] = useState<OverlayImageItem>();\n const [isImageOverlayOpen, setIsImageOverlayOpen] = useState<boolean>(false);\n /* @conditional-compile-remove(file-sharing-acs) */\n const [uploads, handleUploadAction] = useReducer(AttachmentUploadReducer, []);\n\n const adapter = useAdapter();\n const theme = useTheme();\n\n useEffect(() => {\n // Initial data should be always fetched by the composite(or external caller) instead of the adapter\n const fetchData: () => Promise<void> = async () => {\n // Fetch initial data for adapter\n await adapter.fetchInitialData();\n // Fetch initial set of messages. Without fetching messages here, if the Composite's adapter is changed the message thread does not load new messages.\n await adapter.loadPreviousChatMessages(defaultNumberOfChatMessagesToReload);\n };\n fetchData();\n }, [adapter]);\n\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n useEffect(() => {\n // if rich text editor is enabled, the rich text editor component should be loaded early for good UX\n if (options?.richTextEditor !== undefined && options.richTextEditor) {\n // this line is needed to load the Rooster JS dependencies early in the lifecycle\n // when the rich text editor is enabled\n loadRichTextSendBox();\n }\n }, [options?.richTextEditor]);\n\n const messageThreadProps = usePropsFor(MessageThread);\n const typingIndicatorProps = usePropsFor(TypingIndicator);\n const headerProps = useAdaptedSelector(getHeaderProps);\n const errorBarProps = usePropsFor(ErrorBar);\n\n useEffect(() => {\n if (overlayImageItem === undefined) {\n return;\n }\n const message = adapter.getState().thread.chatMessages[overlayImageItem.messageId];\n if (message === undefined) {\n return;\n }\n const resourceCache = message.resourceCache;\n if (overlayImageItem.imageSrc === '' && resourceCache && resourceCache[overlayImageItem.imageUrl]) {\n const fullSizeImageSrc = getResourceSourceUrl(resourceCache[overlayImageItem.imageUrl]);\n if (fullSizeImageSrc === undefined || fullSizeImageSrc === '' || overlayImageItem.imageSrc === fullSizeImageSrc) {\n return;\n }\n setOverlayImageItem({\n ...overlayImageItem,\n imageSrc: fullSizeImageSrc\n });\n }\n // Disable eslint because we are using the overlayImageItem in this effect but don't want to have it as a dependency, as it will cause an infinite loop.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [messageThreadProps.messages]);\n\n const getResourceSourceUrl = (result: ResourceFetchResult): string => {\n let src = '';\n if (result.error || !result.sourceUrl) {\n src = 'blob://';\n } else {\n src = result.sourceUrl;\n }\n\n return src;\n };\n\n const onRenderAvatarCallback = useCallback(\n (userId?: string, defaultOptions?: AvatarPersonaProps) => {\n return (\n <AvatarPersona\n userId={userId}\n hidePersonaDetails={true}\n {...defaultOptions}\n dataProvider={onFetchAvatarPersonaData}\n />\n );\n },\n [onFetchAvatarPersonaData]\n );\n\n const messageThreadStyles = useMemo(() => {\n return Object.assign(\n {},\n messageThreadChatCompositeStyles(theme.semanticColors.bodyBackground),\n styles?.messageThread\n );\n }, [styles?.messageThread, theme.semanticColors.bodyBackground]);\n\n const typingIndicatorStyles = useMemo(() => {\n return Object.assign({}, styles?.typingIndicator);\n }, [styles?.typingIndicator]);\n\n const sendBoxStyles = useMemo(() => {\n return Object.assign({}, styles?.sendBox);\n }, [styles?.sendBox]);\n\n const userId = toFlatCommunicationIdentifier(adapter.getState().userId);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachmentUploadButtonOnChange = useCallback(\n (files: FileList | null): void => {\n if (!files) {\n return;\n }\n\n // Get files, change to tasks, store locally and pass back to Contoso\n const newUploads = Array.from(files).map((file): AttachmentUpload => {\n const taskId = nanoid();\n return {\n file,\n taskId,\n metadata: {\n id: taskId,\n name: file.name,\n progress: 0\n },\n notifyUploadProgressChanged: (value: number) => {\n handleUploadAction({ type: AttachmentUploadActionType.Progress, taskId, progress: value });\n },\n notifyUploadCompleted: (id: string, url: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Completed, taskId, id, url });\n },\n notifyUploadFailed: (message: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Failed, taskId, message });\n // remove the failed upload task when error banner is auto dismissed after 10 seconds\n // so the banner won't be shown again on UI re-rendering.\n setTimeout(() => {\n handleUploadAction({ type: AttachmentUploadActionType.Remove, id: taskId });\n }, 10 * 1000);\n }\n };\n });\n\n handleUploadAction({ type: AttachmentUploadActionType.Set, newUploads });\n attachmentOptions?.uploadOptions?.handleAttachmentSelection(newUploads);\n },\n [attachmentOptions?.uploadOptions]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentDownloads = useCallback(\n (message: ChatMessage) =>\n message?.attachments?.length ?? 0 > 0 ? (\n <_AttachmentDownloadCards\n attachments={message.attachments}\n message={message}\n actionsForAttachment={attachmentOptions?.downloadOptions?.actionsForAttachment}\n onActionHandlerFailed={(errorMessage: string) => {\n setDownloadErrorMessage(errorMessage);\n }}\n />\n ) : (\n <></>\n ),\n [attachmentOptions?.downloadOptions?.actionsForAttachment]\n );\n\n const onInlineImageClicked = useCallback(\n (attachmentId: string, messageId: string) => {\n const message = adapter.getState().thread.chatMessages[messageId];\n const inlinedImages = message.content?.attachments?.filter((attachment) => {\n return attachment.attachmentType === 'image' && attachment.id === attachmentId;\n });\n\n if (!inlinedImages || inlinedImages.length <= 0) {\n return;\n }\n\n const attachment = inlinedImages[0];\n\n const resourceCache = message.resourceCache;\n let imageSrc = '';\n\n if (attachment.url) {\n if (resourceCache && resourceCache[attachment.url]) {\n imageSrc = getResourceSourceUrl(resourceCache[attachment.url]);\n } else {\n adapter.downloadResourceToCache({\n threadId: adapter.getState().thread.threadId,\n messageId: messageId,\n resourceUrl: attachment.url\n });\n }\n }\n\n const titleIconRenderOptions = {\n text: message.senderDisplayName,\n size: PersonaSize.size32,\n showOverflowTooltip: false,\n imageAlt: message.senderDisplayName\n };\n\n const messageSenderId = message.sender !== undefined ? toFlatCommunicationIdentifier(message.sender) : userId;\n const titleIcon = onRenderAvatarCallback && onRenderAvatarCallback(messageSenderId, titleIconRenderOptions);\n const overlayImage: OverlayImageItem = {\n title: message.senderDisplayName || '',\n titleIcon: titleIcon,\n attachmentId: attachment.id,\n imageSrc: imageSrc,\n messageId: messageId,\n imageUrl: attachment.url || ''\n };\n\n setIsImageOverlayOpen(true);\n setOverlayImageItem(overlayImage);\n },\n [adapter, onRenderAvatarCallback, userId]\n );\n\n const onRenderInlineImage = useCallback(\n (inlineImage: InlineImage, defaultOnRender: (inlineImage: InlineImage) => JSX.Element): JSX.Element => {\n const message = adapter.getState().thread.chatMessages[inlineImage.messageId];\n const attachment = message?.content?.attachments?.find(\n (attachment) => attachment.id === inlineImage.imageAttributes.id\n );\n\n if (attachment === undefined) {\n return defaultOnRender(inlineImage);\n }\n\n let pointerEvents: 'none' | 'auto' = inlineImage.imageAttributes.src === '' ? 'none' : 'auto';\n const resourceCache = message.resourceCache;\n if (\n resourceCache &&\n attachment.previewUrl &&\n resourceCache[attachment.previewUrl] &&\n resourceCache[attachment.previewUrl].error\n ) {\n pointerEvents = 'none';\n }\n\n return (\n <span\n key={inlineImage.imageAttributes.id}\n onClick={() => onInlineImageClicked(inlineImage.imageAttributes.id || '', inlineImage.messageId)}\n tabIndex={0}\n role=\"button\"\n onKeyDown={(e) => {\n if (e.key === 'Enter') {\n onInlineImageClicked(inlineImage.imageAttributes.id || '', inlineImage.messageId);\n }\n }}\n style={{ cursor: 'pointer', pointerEvents }}\n >\n {defaultOnRender(inlineImage)}\n </span>\n );\n },\n [adapter, onInlineImageClicked]\n );\n\n const inlineImageOptions = useMemo(() => {\n return { onRenderInlineImage: onRenderInlineImage };\n }, [onRenderInlineImage]);\n\n const onDownloadButtonClicked = useCallback(\n (imageSrc: string): void => {\n if (imageSrc === '') {\n return;\n }\n if (isIOS()) {\n window.open(imageSrc, '_blank');\n } else {\n // Create a new anchor element\n const a = document.createElement('a');\n // Set the href and download attributes for the anchor element\n a.href = imageSrc;\n a.download = overlayImageItem?.attachmentId || '';\n a.rel = 'noopener noreferrer';\n a.target = '_blank';\n\n // Programmatically click the anchor element to trigger the download\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n }\n },\n [overlayImageItem?.attachmentId]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const AttachmentButton = useCallback(() => {\n if (!attachmentOptions?.uploadOptions?.handleAttachmentSelection) {\n return null;\n }\n return (\n <AttachmentUploadButton\n supportedMediaTypes={attachmentOptions?.uploadOptions?.supportedMediaTypes}\n disableMultipleUploads={attachmentOptions?.uploadOptions?.disableMultipleUploads}\n onChange={attachmentUploadButtonOnChange}\n />\n );\n return <></>;\n }, [\n attachmentOptions?.uploadOptions?.handleAttachmentSelection,\n attachmentOptions?.uploadOptions?.supportedMediaTypes,\n attachmentOptions?.uploadOptions?.disableMultipleUploads,\n attachmentUploadButtonOnChange\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachments = useMemo(() => {\n return uploads?.map((v) => v.metadata);\n }, [uploads]);\n\n const onSendMessageHandler = useCallback(\n async function (\n content: string,\n /* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */ options?: MessageOptions\n ) {\n /* @conditional-compile-remove(file-sharing-acs) */\n const attachments = options?.attachments ?? [];\n /* @conditional-compile-remove(file-sharing-acs) */\n handleUploadAction({ type: AttachmentUploadActionType.Clear });\n /* @conditional-compile-remove(file-sharing-acs) */\n await adapter.sendMessage(content, {\n attachments: attachments,\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n type: options?.type\n });\n /* @conditional-compile-remove(file-sharing-acs) */\n return;\n await adapter.sendMessage(content, {\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n type: options?.type\n });\n },\n [adapter]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onCancelUploadHandler = useCallback(\n (id: string) => {\n handleUploadAction({ type: AttachmentUploadActionType.Remove, id });\n attachmentOptions?.uploadOptions?.handleAttachmentRemoval?.(id);\n },\n [attachmentOptions?.uploadOptions]\n );\n return (\n <Stack className={chatContainer} grow>\n {options?.topic !== false && <ChatHeader {...headerProps} />}\n <Stack className={chatArea} tokens={participantListContainerPadding} horizontal grow>\n <Stack className={chatWrapper} grow>\n {options?.errorBar !== false && <ErrorBar {...errorBarProps} />}\n {\n /* @conditional-compile-remove(file-sharing-acs) */\n <AttachmentDownloadErrorBar\n onDismissDownloadErrorMessage={useCallback(() => {\n setDownloadErrorMessage('');\n }, [])}\n attachmentDownloadErrorMessage={downloadErrorMessage || ''}\n />\n }\n <MessageThread\n {...messageThreadProps}\n onRenderAvatar={onRenderAvatarCallback}\n onRenderMessage={onRenderMessage}\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentDownloads={onRenderAttachmentDownloads}\n inlineImageOptions={inlineImageOptions}\n numberOfChatMessagesToReload={defaultNumberOfChatMessagesToReload}\n styles={messageThreadStyles}\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n richTextEditor={options?.richTextEditor}\n />\n <Stack className={mergeStyles(sendboxContainerStyles)}>\n <div className={mergeStyles(typingIndicatorContainerStyles)}>\n {onRenderTypingIndicator ? (\n onRenderTypingIndicator(typingIndicatorProps.typingUsers)\n ) : (\n <TypingIndicator {...typingIndicatorProps} styles={typingIndicatorStyles} />\n )}\n </div>\n <Stack horizontal={formFactor === 'mobile'}>\n {formFactor === 'mobile' && (\n /* @conditional-compile-remove(file-sharing-acs) */\n <Stack verticalAlign=\"center\">\n <AttachmentButton />\n </Stack>\n )}\n <Stack grow>\n <SendBoxPicker\n styles={sendBoxStyles}\n autoFocus={options?.autoFocus}\n /* @conditional-compile-remove(rich-text-editor-composite-support) */\n richTextEditor={options?.richTextEditor}\n /* @conditional-compile-remove(file-sharing-acs) */\n attachments={attachments}\n /* @conditional-compile-remove(file-sharing-acs) */\n onCancelAttachmentUpload={onCancelUploadHandler}\n // we need to overwrite onSendMessage for SendBox because we need to clear attachment state\n // when submit button is clicked\n onSendMessage={onSendMessageHandler}\n />\n </Stack>\n {formFactor !== 'mobile' && (\n /* @conditional-compile-remove(file-sharing-acs) */\n <AttachmentButton />\n )}\n </Stack>\n </Stack>\n </Stack>\n {\n /* @conditional-compile-remove(chat-composite-participant-pane) */\n options?.participantPane === true && (\n <ChatScreenPeoplePane\n onFetchAvatarPersonaData={onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n isMobile={formFactor === 'mobile'}\n />\n )\n }\n </Stack>\n {overlayImageItem && (\n <ImageOverlay\n {...overlayImageItem}\n isOpen={isImageOverlayOpen}\n onDismiss={() => {\n setOverlayImageItem(undefined);\n setIsImageOverlayOpen(false);\n adapter.removeResourceFromCache({\n threadId: adapter.getState().thread.threadId,\n messageId: overlayImageItem.messageId,\n resourceUrl: overlayImageItem.imageUrl\n });\n }}\n onDownloadButtonClicked={onDownloadButtonClicked}\n />\n )}\n </Stack>\n );\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/ChatComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Strings used by the {@link ChatComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface ChatCompositeStrings {\n /**\n * Chat list header text\n */\n chatListHeader: string;\n\n /* @conditional-compile-remove(
|
1
|
+
{"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/ChatComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Strings used by the {@link ChatComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface ChatCompositeStrings {\n /**\n * Chat list header text\n */\n chatListHeader: string;\n\n /* @conditional-compile-remove(file-sharing-acs) */\n /**\n * Upload Attachment Button text\n */\n uploadAttachment: string;\n}\n"]}
|
@@ -38,13 +38,13 @@ export declare class AzureCommunicationChatAdapter implements ChatAdapter {
|
|
38
38
|
getState(): ChatAdapterState;
|
39
39
|
onStateChange(handler: (state: ChatAdapterState) => void): void;
|
40
40
|
offStateChange(handler: (state: ChatAdapterState) => void): void;
|
41
|
-
sendMessage(content: string, options?: SendMessageOptions | /* @conditional-compile-remove(
|
41
|
+
sendMessage(content: string, options?: SendMessageOptions | /* @conditional-compile-remove(file-sharing-acs) */ MessageOptions): Promise<void>;
|
42
42
|
sendReadReceipt(chatMessageId: string): Promise<void>;
|
43
43
|
sendTypingIndicator(): Promise<void>;
|
44
44
|
removeParticipant(userId: string): Promise<void>;
|
45
45
|
setTopic(topicName: string): Promise<void>;
|
46
46
|
loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;
|
47
|
-
updateMessage(messageId: string, content: string, options?: Record<string, string> | /* @conditional-compile-remove(
|
47
|
+
updateMessage(messageId: string, content: string, options?: Record<string, string> | /* @conditional-compile-remove(file-sharing-acs) */ MessageOptions): Promise<void>;
|
48
48
|
deleteMessage(messageId: string): Promise<void>;
|
49
49
|
downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>;
|
50
50
|
removeResourceFromCache(resourceDetails: ResourceDetails): void;
|
@@ -69,7 +69,7 @@ export class ChatContext {
|
|
69
69
|
thread,
|
70
70
|
latestErrors: clientState.latestErrors
|
71
71
|
};
|
72
|
-
/* @conditional-compile-remove(
|
72
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
73
73
|
updatedState = Object.assign({}, updatedState);
|
74
74
|
this.setState(updatedState);
|
75
75
|
}
|
@@ -203,30 +203,30 @@ export class AzureCommunicationChatAdapter {
|
|
203
203
|
return __awaiter(this, void 0, void 0, function* () {
|
204
204
|
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter(this, void 0, void 0, function* () {
|
205
205
|
var _a;
|
206
|
-
/* @conditional-compile-remove(
|
206
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
207
207
|
const messageOptions = {};
|
208
|
-
/* @conditional-compile-remove(
|
208
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
209
209
|
if (options &&
|
210
210
|
// if options.attachments is an array or undefined (for removal all attachments),
|
211
211
|
// then given options is a MessageOptions
|
212
212
|
(Array.isArray(options.attachments) || options.attachments === undefined)) {
|
213
213
|
messageOptions.attachments = (_a = options.attachments) !== null && _a !== void 0 ? _a : [];
|
214
214
|
}
|
215
|
-
/* @conditional-compile-remove(
|
215
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
216
216
|
if (options &&
|
217
217
|
// if options.metadata is provided, we need to add it in MessageOptions
|
218
218
|
options.metadata &&
|
219
219
|
typeof options.metadata === 'object') {
|
220
220
|
messageOptions.metadata = options.metadata;
|
221
221
|
}
|
222
|
-
/* @conditional-compile-remove(
|
222
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
223
223
|
if (options && !('attachments' in options) && !('metadata' in options)) {
|
224
224
|
// if options don't have attachments or metadata,
|
225
225
|
// then it is a Record<string, string>
|
226
|
-
/* @conditional-compile-remove(
|
226
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
227
227
|
return yield this.handlers.onUpdateMessage(messageId, content, options);
|
228
228
|
}
|
229
|
-
/* @conditional-compile-remove(
|
229
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
230
230
|
return yield this.handlers.onUpdateMessage(messageId, content, messageOptions);
|
231
231
|
// metadata is never used in the current stable
|
232
232
|
return yield this.handlers.onUpdateMessage(messageId, content);
|