@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
@@ -174,7 +174,7 @@ function getDefaultExportFromCjs (x) {
|
|
174
174
|
// Copyright (c) Microsoft Corporation.
|
175
175
|
// Licensed under the MIT License.
|
176
176
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
177
|
-
var telemetryVersion = '1.17.0-alpha-
|
177
|
+
var telemetryVersion = '1.17.0-alpha-202406050014';
|
178
178
|
|
179
179
|
|
180
180
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -6269,7 +6269,7 @@ const ErrorBar = (props) => {
|
|
6269
6269
|
return trackDismissedErrorsInternally
|
6270
6270
|
? setDismissedErrors(dismissError(dismissedErrors, error))
|
6271
6271
|
: (_a = props.onDismissError) === null || _a === void 0 ? void 0 : _a.call(props, error);
|
6272
|
-
}, dismissButtonAriaLabel: strings.
|
6272
|
+
}, dismissButtonAriaLabel: `${strings[error.type]}, ${strings.dismissButtonAriaLabel}`, dismissIconProps: { iconName: 'ErrorBarClear' } }), strings[error.type])))));
|
6273
6273
|
};
|
6274
6274
|
|
6275
6275
|
// Copyright (c) Microsoft Corporation.
|
@@ -6492,8 +6492,8 @@ const sendButtonStyle = react.mergeStyles({
|
|
6492
6492
|
*/
|
6493
6493
|
const sendIconStyle = (props) => {
|
6494
6494
|
const { theme, hasText, disabled = false,
|
6495
|
-
/* @conditional-compile-remove(
|
6496
|
-
const hasNoContent = !hasText && /* @conditional-compile-remove(
|
6495
|
+
/* @conditional-compile-remove(file-sharing-acs) */ hasAttachment, hasErrorMessage, customSendIconStyle, defaultTextColor = theme.palette.neutralTertiary } = props;
|
6496
|
+
const hasNoContent = !hasText && /* @conditional-compile-remove(file-sharing-acs) */ !hasAttachment;
|
6497
6497
|
return react.mergeStyles(editorTextBoxButtonStyle, {
|
6498
6498
|
color: disabled || hasErrorMessage || hasNoContent ? defaultTextColor : theme.palette.themePrimary
|
6499
6499
|
}, customSendIconStyle);
|
@@ -6835,13 +6835,13 @@ const DEFAULT_COMPONENT_ICONS = {
|
|
6835
6835
|
RaiseHandContextualMenuItem: React.createElement(reactIcons.HandRight20Regular, null),
|
6836
6836
|
LowerHandContextualMenuItem: React.createElement(reactIcons.HandRightOff20Regular, null),
|
6837
6837
|
ReactionButtonIcon: React.createElement(reactIcons.Emoji20Regular, null),
|
6838
|
-
/* @conditional-compile-remove(
|
6838
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
6839
6839
|
CancelAttachmentUpload: React.createElement(reactIcons.Dismiss16Regular, null),
|
6840
|
-
/* @conditional-compile-remove(
|
6840
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
6841
6841
|
DownloadAttachment: React.createElement(reactIcons.ArrowDownload20Regular, null),
|
6842
|
-
/* @conditional-compile-remove(
|
6842
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
6843
6843
|
OpenAttachment: React.createElement(reactIcons.Open20Regular, null),
|
6844
|
-
/* @conditional-compile-remove(
|
6844
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
6845
6845
|
AttachmentMoreMenu: React.createElement(reactIcons.MoreHorizontal20Filled, null),
|
6846
6846
|
/* @conditional-compile-remove(data-loss-prevention) */
|
6847
6847
|
DataLossPreventionProhibited: React.createElement(DataLossPreventionProhibited16Regular, null),
|
@@ -8892,13 +8892,13 @@ const SendBoxErrors = (props) => {
|
|
8892
8892
|
|
8893
8893
|
// Copyright (c) Microsoft Corporation.
|
8894
8894
|
// Licensed under the MIT License.
|
8895
|
-
/* @conditional-compile-remove(
|
8895
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
8896
8896
|
/**
|
8897
8897
|
* Conditionally modify locale strings passed to the attachment card
|
8898
8898
|
* @returns attachment card strings
|
8899
8899
|
*/
|
8900
8900
|
const useLocaleAttachmentCardStringsTrampoline = () => {
|
8901
|
-
/* @conditional-compile-remove(
|
8901
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
8902
8902
|
return useLocale$1().strings.sendBox;
|
8903
8903
|
};
|
8904
8904
|
|
@@ -9058,7 +9058,7 @@ const useAttachmentCardGroupStyles = reactComponents.makeStyles({
|
|
9058
9058
|
marginTop: '0.25rem'
|
9059
9059
|
},
|
9060
9060
|
singleAttachment: {
|
9061
|
-
|
9061
|
+
width: `${_ATTACHMENT_CARD_WIDTH_IN_REM}rem`
|
9062
9062
|
},
|
9063
9063
|
multipleAttachments: {
|
9064
9064
|
width: '100%'
|
@@ -9068,7 +9068,9 @@ const useAttachmentCardGroupStyles = reactComponents.makeStyles({
|
|
9068
9068
|
* @private
|
9069
9069
|
*/
|
9070
9070
|
const attachmentCardBaseStyles = react.mergeStyles({
|
9071
|
-
'& > *':
|
9071
|
+
'& > *': {
|
9072
|
+
margin: `${_pxToRem(_ATTACHMENT_CARD_MARGIN_IN_PX)}`
|
9073
|
+
},
|
9072
9074
|
/**
|
9073
9075
|
* margin for children is overriden by parent stack, so adding left margin for each child
|
9074
9076
|
*/
|
@@ -9171,7 +9173,7 @@ const _AttachmentUploadCards = (props) => {
|
|
9171
9173
|
*/
|
9172
9174
|
const MAXIMUM_LENGTH_OF_MESSAGE = 8000;
|
9173
9175
|
const EMPTY_MESSAGE_REGEX = /^\s*$/;
|
9174
|
-
/* @conditional-compile-remove(
|
9176
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9175
9177
|
/**
|
9176
9178
|
* @private
|
9177
9179
|
*/
|
@@ -9181,7 +9183,7 @@ const hasIncompleteAttachmentUploads = (attachmentsWithProgress) => {
|
|
9181
9183
|
.filter((attachmentUpload) => !attachmentUpload.error)
|
9182
9184
|
.every((attachmentUpload) => attachmentUpload.progress === 1 && attachmentUpload.progress !== undefined));
|
9183
9185
|
};
|
9184
|
-
/* @conditional-compile-remove(
|
9186
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9185
9187
|
/**
|
9186
9188
|
* @private
|
9187
9189
|
*/
|
@@ -9215,11 +9217,11 @@ const sanitizeText = (message) => {
|
|
9215
9217
|
* @returns A boolean value indicating whether the send box should be disabled for ARIA accessibility.
|
9216
9218
|
*/
|
9217
9219
|
const isSendBoxButtonAriaDisabled = ({ hasContent,
|
9218
|
-
/* @conditional-compile-remove(
|
9220
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9219
9221
|
hasCompletedAttachmentUploads, hasError, disabled }) => {
|
9220
9222
|
return (
|
9221
9223
|
// no content
|
9222
|
-
!(hasContent || /* @conditional-compile-remove(
|
9224
|
+
!(hasContent || /* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads) ||
|
9223
9225
|
//error message exists
|
9224
9226
|
hasError ||
|
9225
9227
|
disabled);
|
@@ -9596,7 +9598,7 @@ const SendBox = (props) => {
|
|
9596
9598
|
const { disabled, systemMessage, supportNewline, onSendMessage, onTyping, onRenderIcon, onRenderSystemMessage, styles, autoFocus,
|
9597
9599
|
/* @conditional-compile-remove(mention) */
|
9598
9600
|
mentionLookupOptions,
|
9599
|
-
/* @conditional-compile-remove(
|
9601
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9600
9602
|
attachments } = props;
|
9601
9603
|
const theme = useTheme();
|
9602
9604
|
const localeStrings = useLocale$1().strings.sendBox;
|
@@ -9605,7 +9607,7 @@ const SendBox = (props) => {
|
|
9605
9607
|
const [textValue, setTextValue] = React.useState('');
|
9606
9608
|
const [textValueOverflow, setTextValueOverflow] = React.useState(false);
|
9607
9609
|
const sendTextFieldRef = React.useRef(null);
|
9608
|
-
/* @conditional-compile-remove(
|
9610
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9609
9611
|
const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = React.useState(undefined);
|
9610
9612
|
const sendMessageOnClick = () => {
|
9611
9613
|
var _a;
|
@@ -9614,9 +9616,9 @@ const SendBox = (props) => {
|
|
9614
9616
|
return;
|
9615
9617
|
}
|
9616
9618
|
// Don't send message until all attachments have been uploaded successfully
|
9617
|
-
/* @conditional-compile-remove(
|
9619
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9618
9620
|
setAttachmentUploadsPendingError(undefined);
|
9619
|
-
/* @conditional-compile-remove(
|
9621
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9620
9622
|
if (hasIncompleteAttachmentUploads(attachments)) {
|
9621
9623
|
setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });
|
9622
9624
|
return;
|
@@ -9625,12 +9627,12 @@ const SendBox = (props) => {
|
|
9625
9627
|
// we don't want to send empty messages including spaces, newlines, tabs
|
9626
9628
|
// Message can be empty if there is a valid attachment upload
|
9627
9629
|
if (sanitizeText(message).length > 0 ||
|
9628
|
-
/* @conditional-compile-remove(
|
9630
|
+
/* @conditional-compile-remove(file-sharing-acs) */ isAttachmentUploadCompleted(attachments)) {
|
9629
9631
|
onSendMessage &&
|
9630
9632
|
onSendMessage(message,
|
9631
|
-
/* @conditional-compile-remove(
|
9633
|
+
/* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */
|
9632
9634
|
{
|
9633
|
-
/* @conditional-compile-remove(
|
9635
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9634
9636
|
attachments: toAttachmentMetadata(attachments),
|
9635
9637
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
9636
9638
|
type: 'text'
|
@@ -9639,7 +9641,7 @@ const SendBox = (props) => {
|
|
9639
9641
|
(_a = sendTextFieldRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
9640
9642
|
}
|
9641
9643
|
};
|
9642
|
-
/* @conditional-compile-remove(
|
9644
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9643
9645
|
const toAttachmentMetadata = React.useCallback((attachmentsWithProgress) => {
|
9644
9646
|
return attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter((attachment) => {
|
9645
9647
|
var _a;
|
@@ -9667,14 +9669,14 @@ const SendBox = (props) => {
|
|
9667
9669
|
const mergedSendIconStyle = React.useMemo(() => sendIconStyle({
|
9668
9670
|
theme,
|
9669
9671
|
hasText: sanitizeText(textValue).length > 0,
|
9670
|
-
/* @conditional-compile-remove(
|
9672
|
+
/* @conditional-compile-remove(file-sharing-acs) */ hasAttachment: isAttachmentUploadCompleted(attachments),
|
9671
9673
|
hasErrorMessage: !!errorMessage,
|
9672
9674
|
customSendIconStyle: styles === null || styles === void 0 ? void 0 : styles.sendMessageIcon,
|
9673
9675
|
disabled: !!disabled
|
9674
9676
|
}), [
|
9675
9677
|
theme,
|
9676
9678
|
textValue,
|
9677
|
-
/* @conditional-compile-remove(
|
9679
|
+
/* @conditional-compile-remove(file-sharing-acs) */ attachments,
|
9678
9680
|
errorMessage,
|
9679
9681
|
styles === null || styles === void 0 ? void 0 : styles.sendMessageIcon,
|
9680
9682
|
disabled
|
@@ -9682,12 +9684,12 @@ const SendBox = (props) => {
|
|
9682
9684
|
const isSendBoxButtonAriaDisabledValue = React.useMemo(() => {
|
9683
9685
|
return isSendBoxButtonAriaDisabled({
|
9684
9686
|
hasContent: sanitizeText(textValue).length > 0,
|
9685
|
-
/* @conditional-compile-remove(
|
9687
|
+
/* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads: isAttachmentUploadCompleted(attachments),
|
9686
9688
|
hasError: !!errorMessage,
|
9687
9689
|
disabled: !!disabled
|
9688
9690
|
});
|
9689
9691
|
}, [
|
9690
|
-
/* @conditional-compile-remove(
|
9692
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9691
9693
|
attachments,
|
9692
9694
|
disabled,
|
9693
9695
|
errorMessage,
|
@@ -9695,13 +9697,13 @@ const SendBox = (props) => {
|
|
9695
9697
|
]);
|
9696
9698
|
const onRenderSendIcon = React.useCallback((isHover) => onRenderIcon ? (onRenderIcon(isHover)) : (React.createElement(react.Icon, { iconName: isHover && textValue ? 'SendBoxSendHovered' : 'SendBoxSend', className: mergedSendIconStyle })), [mergedSendIconStyle, onRenderIcon, textValue]);
|
9697
9699
|
// Ensure that errors are cleared when there are no attachments in sendBox
|
9698
|
-
/* @conditional-compile-remove(
|
9700
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9699
9701
|
React.useEffect(() => {
|
9700
9702
|
if (!(attachments === null || attachments === void 0 ? void 0 : attachments.filter((upload) => !upload.error).length)) {
|
9701
9703
|
setAttachmentUploadsPendingError(undefined);
|
9702
9704
|
}
|
9703
9705
|
}, [attachments]);
|
9704
|
-
/* @conditional-compile-remove(
|
9706
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9705
9707
|
const sendBoxErrorsProps = React.useMemo(() => {
|
9706
9708
|
var _a;
|
9707
9709
|
return {
|
@@ -9709,7 +9711,7 @@ const SendBox = (props) => {
|
|
9709
9711
|
attachmentProgressError: (_a = attachments === null || attachments === void 0 ? void 0 : attachments.filter((attachmentUpload) => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error
|
9710
9712
|
};
|
9711
9713
|
}, [attachments, attachmentUploadsPendingError]);
|
9712
|
-
/* @conditional-compile-remove(
|
9714
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9713
9715
|
const onRenderAttachmentUploads = React.useCallback(() => {
|
9714
9716
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
9715
9717
|
if (!(attachments === null || attachments === void 0 ? void 0 : attachments.filter((upload) => !upload.error).length)) {
|
@@ -9734,7 +9736,7 @@ const SendBox = (props) => {
|
|
9734
9736
|
]);
|
9735
9737
|
return (React.createElement(react.Stack, { className: react.mergeStyles(sendBoxWrapperStyles, { overflow: 'visible' } // This is needed for the mention popup to be visible
|
9736
9738
|
) },
|
9737
|
-
/* @conditional-compile-remove(
|
9739
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9738
9740
|
React.createElement(SendBoxErrors, { attachmentProgressError: sendBoxErrorsProps.attachmentProgressError
|
9739
9741
|
? {
|
9740
9742
|
message: sendBoxErrorsProps.attachmentProgressError.message,
|
@@ -9762,7 +9764,7 @@ const SendBox = (props) => {
|
|
9762
9764
|
}
|
9763
9765
|
e.stopPropagation();
|
9764
9766
|
}, id: 'sendIconWrapper', className: mergedSendButtonStyle, ariaLabel: localeStrings.sendButtonAriaLabel, tooltipContent: localeStrings.sendButtonAriaLabel, ariaDisabled: isSendBoxButtonAriaDisabledValue })),
|
9765
|
-
/* @conditional-compile-remove(
|
9767
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
9766
9768
|
onRenderAttachmentUploads())));
|
9767
9769
|
};
|
9768
9770
|
|
@@ -11367,9 +11369,9 @@ const richTextBorderBoxStyle = (props) => {
|
|
11367
11369
|
*/
|
11368
11370
|
const RichTextInputBoxComponent = (props) => {
|
11369
11371
|
const { placeholderText, initialContent, onChange, onEnterKeyDown, editorComponentRef, disabled, strings, actionComponents,
|
11370
|
-
/* @conditional-compile-remove(
|
11372
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11371
11373
|
onRenderAttachmentUploads,
|
11372
|
-
/* @conditional-compile-remove(
|
11374
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11373
11375
|
hasAttachments, richTextEditorStyleProps, isHorizontalLayoutDisabled = false, autoFocus, onTyping } = props;
|
11374
11376
|
const theme = useTheme();
|
11375
11377
|
// undefined is used to indicate that the rich text editor toolbar state wasn't changed yet
|
@@ -11425,11 +11427,11 @@ const RichTextInputBoxComponent = (props) => {
|
|
11425
11427
|
const isRichTextEditorToolbarShown = showRichTextEditorFormatting === true;
|
11426
11428
|
return (!isHorizontalLayoutDisabled &&
|
11427
11429
|
!isRichTextEditorToolbarShown &&
|
11428
|
-
/* @conditional-compile-remove(
|
11430
|
+
/* @conditional-compile-remove(file-sharing-acs) */ !hasAttachments);
|
11429
11431
|
}, [
|
11430
11432
|
isHorizontalLayoutDisabled,
|
11431
11433
|
showRichTextEditorFormatting,
|
11432
|
-
/* @conditional-compile-remove(
|
11434
|
+
/* @conditional-compile-remove(file-sharing-acs) */ hasAttachments
|
11433
11435
|
]);
|
11434
11436
|
const onContentModelUpdate = React.useCallback((contentModel) => {
|
11435
11437
|
setContentModel(contentModel);
|
@@ -11441,9 +11443,8 @@ const RichTextInputBoxComponent = (props) => {
|
|
11441
11443
|
React.createElement(react.Stack, { grow: true, horizontal: useHorizontalLayout, horizontalAlign: useHorizontalLayout ? 'end' : 'space-between', className: inputBoxContentStackStyle, wrap: useHorizontalLayout },
|
11442
11444
|
React.createElement(react.Stack, { grow: true, className: inputBoxRichTextStackStyle },
|
11443
11445
|
React.createElement(react.Stack.Item, { className: inputBoxRichTextStackItemStyle },
|
11444
|
-
React.createElement(RichTextEditor, { contentModel: contentModel, initialContent: initialContent, placeholderText: placeholderText, onChange: onChange, onKeyDown: onKeyDown, ref: editorComponentRef, strings: strings, showRichTextEditorFormatting: showRichTextEditorFormatting === true, styles: richTextEditorStyle, autoFocus: autoFocus, onContentModelUpdate: onContentModelUpdate })),
|
11445
|
-
|
11446
|
-
onRenderAttachmentUploads()),
|
11446
|
+
React.createElement(RichTextEditor, { contentModel: contentModel, initialContent: initialContent, placeholderText: placeholderText, onChange: onChange, onKeyDown: onKeyDown, ref: editorComponentRef, strings: strings, showRichTextEditorFormatting: showRichTextEditorFormatting === true, styles: richTextEditorStyle, autoFocus: autoFocus, onContentModelUpdate: onContentModelUpdate })), /* @conditional-compile-remove(file-sharing-acs) */
|
11447
|
+
onRenderAttachmentUploads && onRenderAttachmentUploads()),
|
11447
11448
|
actionButtons)));
|
11448
11449
|
};
|
11449
11450
|
|
@@ -11454,9 +11455,9 @@ const RichTextInputBoxComponent = (props) => {
|
|
11454
11455
|
*/
|
11455
11456
|
const RichTextSendBoxErrors = (props) => {
|
11456
11457
|
const {
|
11457
|
-
/* @conditional-compile-remove(
|
11458
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11458
11459
|
attachmentProgressError,
|
11459
|
-
/* @conditional-compile-remove(
|
11460
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11460
11461
|
attachmentUploadsPendingError, systemMessage, textTooLongMessage } = props;
|
11461
11462
|
const [sendBoxError, setSendBoxError] = React.useState(undefined);
|
11462
11463
|
React.useEffect(() => {
|
@@ -11481,11 +11482,11 @@ const RichTextSendBoxErrors = (props) => {
|
|
11481
11482
|
if (prev) {
|
11482
11483
|
errors.push(prev);
|
11483
11484
|
}
|
11484
|
-
/* @conditional-compile-remove(
|
11485
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11485
11486
|
if (attachmentUploadsPendingError) {
|
11486
11487
|
errors.push(attachmentUploadsPendingError);
|
11487
11488
|
}
|
11488
|
-
/* @conditional-compile-remove(
|
11489
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11489
11490
|
if (attachmentProgressError) {
|
11490
11491
|
errors.push(attachmentProgressError);
|
11491
11492
|
}
|
@@ -11497,8 +11498,8 @@ const RichTextSendBoxErrors = (props) => {
|
|
11497
11498
|
return sortedErrors[0];
|
11498
11499
|
});
|
11499
11500
|
}, [
|
11500
|
-
/* @conditional-compile-remove(
|
11501
|
-
/* @conditional-compile-remove(
|
11501
|
+
/* @conditional-compile-remove(file-sharing-acs) */ attachmentProgressError,
|
11502
|
+
/* @conditional-compile-remove(file-sharing-acs) */ attachmentUploadsPendingError
|
11502
11503
|
]);
|
11503
11504
|
const onDismiss = React.useCallback(() => {
|
11504
11505
|
if (systemMessage && !isMessageEmpty$1(systemMessage)) {
|
@@ -11522,9 +11523,9 @@ const isMessageEmpty$1 = (message) => {
|
|
11522
11523
|
*/
|
11523
11524
|
const RichTextSendBox = (props) => {
|
11524
11525
|
const { disabled = false, systemMessage, autoFocus, onSendMessage, onTyping,
|
11525
|
-
/* @conditional-compile-remove(
|
11526
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11526
11527
|
attachments,
|
11527
|
-
/* @conditional-compile-remove(
|
11528
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11528
11529
|
onCancelAttachmentUpload } = props;
|
11529
11530
|
const theme = useTheme();
|
11530
11531
|
const locale = useLocale$1();
|
@@ -11537,7 +11538,7 @@ const RichTextSendBox = (props) => {
|
|
11537
11538
|
}, [localeStrings, props.strings]);
|
11538
11539
|
const [contentValue, setContentValue] = React.useState('');
|
11539
11540
|
const [contentValueOverflow, setContentValueOverflow] = React.useState(false);
|
11540
|
-
/* @conditional-compile-remove(
|
11541
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11541
11542
|
const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = React.useState(undefined);
|
11542
11543
|
const editorComponentRef = React.useRef(null);
|
11543
11544
|
const contentTooLongMessage = React.useMemo(() => (contentValueOverflow ? strings.textTooLong : undefined), [contentValueOverflow, strings.textTooLong]);
|
@@ -11555,7 +11556,7 @@ const RichTextSendBox = (props) => {
|
|
11555
11556
|
const plainTextContent = (_a = editorComponentRef.current) === null || _a === void 0 ? void 0 : _a.getPlainContent();
|
11556
11557
|
return sanitizeText(contentValue !== null && contentValue !== void 0 ? contentValue : '').length > 0 && sanitizeText(plainTextContent !== null && plainTextContent !== void 0 ? plainTextContent : '').length > 0;
|
11557
11558
|
}, [contentValue]);
|
11558
|
-
/* @conditional-compile-remove(
|
11559
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11559
11560
|
const toAttachmentMetadata = React.useCallback((attachmentsWithProgress) => {
|
11560
11561
|
return attachmentsWithProgress === null || attachmentsWithProgress === void 0 ? void 0 : attachmentsWithProgress.filter((attachment) => {
|
11561
11562
|
var _a;
|
@@ -11575,9 +11576,9 @@ const RichTextSendBox = (props) => {
|
|
11575
11576
|
return;
|
11576
11577
|
}
|
11577
11578
|
// Don't send message until all attachments have been uploaded successfully
|
11578
|
-
/* @conditional-compile-remove(
|
11579
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11579
11580
|
setAttachmentUploadsPendingError(undefined);
|
11580
|
-
/* @conditional-compile-remove(
|
11581
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11581
11582
|
if (hasIncompleteAttachmentUploads(attachments)) {
|
11582
11583
|
setAttachmentUploadsPendingError({ message: strings.attachmentUploadsPendingError, timestamp: Date.now() });
|
11583
11584
|
return;
|
@@ -11585,11 +11586,11 @@ const RichTextSendBox = (props) => {
|
|
11585
11586
|
const message = contentValue;
|
11586
11587
|
// we don't want to send empty messages including spaces, newlines, tabs
|
11587
11588
|
// Message can be empty if there is a valid attachment upload
|
11588
|
-
if (hasContent || /* @conditional-compile-remove(
|
11589
|
+
if (hasContent || /* @conditional-compile-remove(file-sharing-acs) */ isAttachmentUploadCompleted(attachments)) {
|
11589
11590
|
onSendMessage(message,
|
11590
|
-
/* @conditional-compile-remove(
|
11591
|
+
/* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */
|
11591
11592
|
{
|
11592
|
-
/* @conditional-compile-remove(
|
11593
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11593
11594
|
attachments: toAttachmentMetadata(attachments),
|
11594
11595
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
11595
11596
|
type: 'html'
|
@@ -11601,29 +11602,29 @@ const RichTextSendBox = (props) => {
|
|
11601
11602
|
}, [
|
11602
11603
|
disabled,
|
11603
11604
|
contentValueOverflow,
|
11604
|
-
/* @conditional-compile-remove(
|
11605
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11605
11606
|
attachments,
|
11606
11607
|
contentValue,
|
11607
11608
|
hasContent,
|
11608
|
-
/* @conditional-compile-remove(
|
11609
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11609
11610
|
strings.attachmentUploadsPendingError,
|
11610
11611
|
onSendMessage,
|
11611
|
-
/* @conditional-compile-remove(
|
11612
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11612
11613
|
toAttachmentMetadata
|
11613
11614
|
]);
|
11614
11615
|
const hasErrorMessage = React.useMemo(() => {
|
11615
11616
|
var _a;
|
11616
11617
|
return (!!systemMessage ||
|
11617
11618
|
!!contentTooLongMessage ||
|
11618
|
-
/* @conditional-compile-remove(
|
11619
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11619
11620
|
!!attachmentUploadsPendingError ||
|
11620
|
-
/* @conditional-compile-remove(
|
11621
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11621
11622
|
!!((_a = attachments === null || attachments === void 0 ? void 0 : attachments.filter((attachmentUpload) => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error));
|
11622
11623
|
}, [
|
11623
|
-
/* @conditional-compile-remove(
|
11624
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11624
11625
|
attachments,
|
11625
11626
|
contentTooLongMessage,
|
11626
|
-
/* @conditional-compile-remove(
|
11627
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11627
11628
|
attachmentUploadsPendingError,
|
11628
11629
|
systemMessage
|
11629
11630
|
]);
|
@@ -11631,7 +11632,7 @@ const RichTextSendBox = (props) => {
|
|
11631
11632
|
return (React.createElement(react.Icon, { iconName: isHover && hasContent ? 'SendBoxSendHovered' : 'SendBoxSend', className: sendIconStyle({
|
11632
11633
|
theme,
|
11633
11634
|
hasText: hasContent,
|
11634
|
-
/* @conditional-compile-remove(
|
11635
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11635
11636
|
hasAttachment: false,
|
11636
11637
|
hasErrorMessage: hasErrorMessage,
|
11637
11638
|
defaultTextColor: theme.palette.neutralSecondary,
|
@@ -11640,12 +11641,12 @@ const RichTextSendBox = (props) => {
|
|
11640
11641
|
}, [disabled, hasContent, hasErrorMessage, theme]);
|
11641
11642
|
const sendBoxErrorsProps = React.useMemo(() => {
|
11642
11643
|
var _a, _b;
|
11643
|
-
/* @conditional-compile-remove(
|
11644
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11644
11645
|
const uploadErrorMessage = (_b = (_a = attachments === null || attachments === void 0 ? void 0 : attachments.filter((attachmentUpload) => attachmentUpload.error).pop()) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.message;
|
11645
11646
|
return {
|
11646
|
-
/* @conditional-compile-remove(
|
11647
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11647
11648
|
attachmentUploadsPendingError: attachmentUploadsPendingError,
|
11648
|
-
/* @conditional-compile-remove(
|
11649
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11649
11650
|
attachmentProgressError: uploadErrorMessage
|
11650
11651
|
? {
|
11651
11652
|
message: uploadErrorMessage,
|
@@ -11656,14 +11657,14 @@ const RichTextSendBox = (props) => {
|
|
11656
11657
|
textTooLongMessage: contentTooLongMessage
|
11657
11658
|
};
|
11658
11659
|
}, [
|
11659
|
-
/* @conditional-compile-remove(
|
11660
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11660
11661
|
attachments,
|
11661
11662
|
contentTooLongMessage,
|
11662
|
-
/* @conditional-compile-remove(
|
11663
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11663
11664
|
attachmentUploadsPendingError,
|
11664
11665
|
systemMessage
|
11665
11666
|
]);
|
11666
|
-
/* @conditional-compile-remove(
|
11667
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11667
11668
|
const onRenderAttachmentUploads = React.useCallback(() => {
|
11668
11669
|
return (React.createElement(react.Stack, { className: attachmentUploadCardsStyles },
|
11669
11670
|
React.createElement(FluentV9ThemeProvider, { v8Theme: theme },
|
@@ -11685,27 +11686,27 @@ const RichTextSendBox = (props) => {
|
|
11685
11686
|
const isSendBoxButtonAriaDisabledValue = React.useMemo(() => {
|
11686
11687
|
return isSendBoxButtonAriaDisabled({
|
11687
11688
|
hasContent,
|
11688
|
-
/* @conditional-compile-remove(
|
11689
|
+
/* @conditional-compile-remove(file-sharing-acs) */ hasCompletedAttachmentUploads: isAttachmentUploadCompleted(attachments),
|
11689
11690
|
hasError: hasErrorMessage,
|
11690
11691
|
disabled
|
11691
11692
|
});
|
11692
|
-
}, [/* @conditional-compile-remove(
|
11693
|
+
}, [/* @conditional-compile-remove(file-sharing-acs) */ attachments, disabled, hasContent, hasErrorMessage]);
|
11693
11694
|
const sendButton = React.useMemo(() => {
|
11694
11695
|
return (React.createElement(InputBoxButton, { onRenderIcon: onRenderSendIcon, onClick: (e) => {
|
11695
11696
|
sendMessageOnClick();
|
11696
11697
|
e.stopPropagation(); // Prevents the click from bubbling up and triggering a focus event on the chat.
|
11697
11698
|
}, className: richTextActionButtonsStyle, ariaLabel: localeStrings.sendButtonAriaLabel, tooltipContent: localeStrings.sendButtonAriaLabel, ariaDisabled: isSendBoxButtonAriaDisabledValue }));
|
11698
11699
|
}, [isSendBoxButtonAriaDisabledValue, localeStrings.sendButtonAriaLabel, onRenderSendIcon, sendMessageOnClick]);
|
11699
|
-
/* @conditional-compile-remove(
|
11700
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11700
11701
|
const hasAttachmentUploads = React.useMemo(() => {
|
11701
11702
|
return isAttachmentUploadCompleted(attachments) || hasIncompleteAttachmentUploads(attachments);
|
11702
11703
|
}, [attachments]);
|
11703
11704
|
return (React.createElement(react.Stack, null,
|
11704
11705
|
React.createElement(RichTextSendBoxErrors, Object.assign({}, sendBoxErrorsProps)),
|
11705
11706
|
React.createElement(RichTextInputBoxComponent, { placeholderText: strings.placeholderText, autoFocus: autoFocus, onChange: setContent, onEnterKeyDown: sendMessageOnClick, onTyping: onTyping, editorComponentRef: editorComponentRef, strings: strings, disabled: disabled, actionComponents: sendButton, richTextEditorStyleProps: sendBoxRichTextEditorStyle,
|
11706
|
-
/* @conditional-compile-remove(
|
11707
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11707
11708
|
onRenderAttachmentUploads: onRenderAttachmentUploads,
|
11708
|
-
/* @conditional-compile-remove(
|
11709
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
11709
11710
|
hasAttachments: hasAttachmentUploads })));
|
11710
11711
|
};
|
11711
11712
|
|
@@ -12223,23 +12224,23 @@ const onRenderSubmitIcon = (className) => {
|
|
12223
12224
|
return React.createElement(react.Icon, { iconName: 'EditBoxSubmit', className: className });
|
12224
12225
|
};
|
12225
12226
|
function isMessageEmpty(messageText,
|
12226
|
-
/* @conditional-compile-remove(
|
12227
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
12227
12228
|
attachmentMetadata) {
|
12228
|
-
/* @conditional-compile-remove(
|
12229
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
12229
12230
|
return messageText.trim().length === 0 && (attachmentMetadata === null || attachmentMetadata === void 0 ? void 0 : attachmentMetadata.length) === 0;
|
12230
12231
|
}
|
12231
12232
|
/**
|
12232
12233
|
* @private
|
12233
12234
|
*/
|
12234
12235
|
function getMessageState(messageText,
|
12235
|
-
/* @conditional-compile-remove(
|
12236
|
-
return isMessageEmpty(messageText, /* @conditional-compile-remove(
|
12236
|
+
/* @conditional-compile-remove(file-sharing-acs) */ attachments) {
|
12237
|
+
return isMessageEmpty(messageText, /* @conditional-compile-remove(file-sharing-acs) */ attachments)
|
12237
12238
|
? 'too short'
|
12238
12239
|
: isMessageTooLong(messageText.length)
|
12239
12240
|
? 'too long'
|
12240
12241
|
: 'OK';
|
12241
12242
|
}
|
12242
|
-
/* @conditional-compile-remove(
|
12243
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
12243
12244
|
/**
|
12244
12245
|
* @private
|
12245
12246
|
* @TODO: Remove when file-sharing feature becomes stable.
|
@@ -12247,7 +12248,7 @@ function getMessageState(messageText,
|
|
12247
12248
|
function getMessageWithAttachmentMetadata(message) {
|
12248
12249
|
return message.attachments;
|
12249
12250
|
}
|
12250
|
-
/* @conditional-compile-remove(
|
12251
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
12251
12252
|
/**
|
12252
12253
|
* @internal
|
12253
12254
|
*/
|
@@ -12259,7 +12260,7 @@ const attachmentMetadataReducer = (state, action) => {
|
|
12259
12260
|
return state;
|
12260
12261
|
}
|
12261
12262
|
};
|
12262
|
-
/* @conditional-compile-remove(
|
12263
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
12263
12264
|
/**
|
12264
12265
|
* @internal
|
12265
12266
|
*/
|
@@ -12952,7 +12953,7 @@ const BlockedMessageContent = (props) => {
|
|
12952
12953
|
const extractContentForAllyMessage = (props) => {
|
12953
12954
|
var _a;
|
12954
12955
|
let attachments = undefined;
|
12955
|
-
/* @conditional-compile-remove(
|
12956
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
12956
12957
|
attachments = props.message.attachments;
|
12957
12958
|
if (props.message.content || attachments) {
|
12958
12959
|
// Replace all <img> tags with 'image' for aria.
|
@@ -12970,7 +12971,7 @@ const extractContentForAllyMessage = (props) => {
|
|
12970
12971
|
});
|
12971
12972
|
// Inject message attachment count for aria.
|
12972
12973
|
// this is only applying to file attachments not for inline images.
|
12973
|
-
/* @conditional-compile-remove(
|
12974
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
12974
12975
|
if (attachments && attachments.length > 0) {
|
12975
12976
|
const attachmentCardDescription = attachmentCardGroupDescription(props);
|
12976
12977
|
const attachmentTextNode = document.createElement('div');
|
@@ -13000,12 +13001,12 @@ const messageContentAriaText = (props) => {
|
|
13000
13001
|
message: message
|
13001
13002
|
});
|
13002
13003
|
};
|
13003
|
-
/* @conditional-compile-remove(
|
13004
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13004
13005
|
const attachmentCardGroupDescription = (props) => {
|
13005
13006
|
const attachments = props.message.attachments;
|
13006
13007
|
return getAttachmentCountLiveMessage(attachments !== null && attachments !== void 0 ? attachments : [], props.strings.attachmentCardGroupMessage);
|
13007
13008
|
};
|
13008
|
-
/* @conditional-compile-remove(
|
13009
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13009
13010
|
/**
|
13010
13011
|
* @private
|
13011
13012
|
*/
|
@@ -13115,7 +13116,7 @@ const _AttachmentDownloadCards = (props) => {
|
|
13115
13116
|
}, []);
|
13116
13117
|
const attachmentCardGroupDescription = React.useMemo(() => () => {
|
13117
13118
|
var _a, _b;
|
13118
|
-
/* @conditional-compile-remove(
|
13119
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13119
13120
|
return getAttachmentCountLiveMessage(attachments !== null && attachments !== void 0 ? attachments : [], (_b = (_a = props.strings) === null || _a === void 0 ? void 0 : _a.attachmentCardGroupMessage) !== null && _b !== void 0 ? _b : localeStrings.attachmentCardGroupMessage);
|
13120
13121
|
}, [(_a = props.strings) === null || _a === void 0 ? void 0 : _a.attachmentCardGroupMessage, localeStrings.attachmentCardGroupMessage, attachments]);
|
13121
13122
|
const hasMultipleAttachments = React.useMemo(() => {
|
@@ -13135,7 +13136,7 @@ const _AttachmentDownloadCards = (props) => {
|
|
13135
13136
|
* @private
|
13136
13137
|
*/
|
13137
13138
|
const useLocaleStringsTrampoline = () => {
|
13138
|
-
/* @conditional-compile-remove(
|
13139
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13139
13140
|
return useLocale$1().strings.messageThread;
|
13140
13141
|
};
|
13141
13142
|
/**
|
@@ -13143,17 +13144,34 @@ const useLocaleStringsTrampoline = () => {
|
|
13143
13144
|
*/
|
13144
13145
|
const getDefaultMenuActions = (locale, chatMessage) => {
|
13145
13146
|
var _a;
|
13147
|
+
let actionName = locale.openAttachment;
|
13146
13148
|
// if message is sent by a Teams user, we need to use a different icon ("open")
|
13147
13149
|
if ((_a = chatMessage === null || chatMessage === void 0 ? void 0 : chatMessage.senderId) === null || _a === void 0 ? void 0 : _a.includes('8:orgid:')) {
|
13148
13150
|
return [
|
13149
|
-
|
13151
|
+
{
|
13152
|
+
name: actionName,
|
13153
|
+
icon: React.createElement(react.Icon, { iconName: "OpenAttachment" }),
|
13154
|
+
onClick: defaultOnClickHandler
|
13155
|
+
}
|
13150
13156
|
];
|
13151
13157
|
}
|
13152
13158
|
// otherwise, use the default icon ("download")
|
13159
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13160
|
+
actionName = locale.downloadAttachment;
|
13153
13161
|
return [
|
13154
|
-
Object.assign(Object.assign({}, defaultAttachmentMenuAction), { name:
|
13162
|
+
Object.assign(Object.assign({}, defaultAttachmentMenuAction), { name: actionName })
|
13155
13163
|
];
|
13156
13164
|
};
|
13165
|
+
/**
|
13166
|
+
*
|
13167
|
+
* The default action handler for downloading attachments. This handler will open the attachment's URL in a new tab.
|
13168
|
+
*/
|
13169
|
+
const defaultOnClickHandler = (attachment) => {
|
13170
|
+
return new Promise((resolve) => {
|
13171
|
+
window.open(attachment.url, '_blank', 'noopener,noreferrer');
|
13172
|
+
resolve();
|
13173
|
+
});
|
13174
|
+
};
|
13157
13175
|
/**
|
13158
13176
|
* @beta
|
13159
13177
|
*
|
@@ -13175,12 +13193,7 @@ const defaultAttachmentMenuAction = {
|
|
13175
13193
|
// this is the icon shown on the right of the attachment card
|
13176
13194
|
icon: React.createElement(react.Icon, { iconName: "DownloadAttachment", "data-ui-id": "attachment-download-card-download-icon" }),
|
13177
13195
|
// this is the action that runs when the icon is clicked
|
13178
|
-
onClick:
|
13179
|
-
return new Promise((resolve) => {
|
13180
|
-
window.open(attachment.url, '_blank', 'noopener,noreferrer');
|
13181
|
-
resolve();
|
13182
|
-
});
|
13183
|
-
}
|
13196
|
+
onClick: defaultOnClickHandler
|
13184
13197
|
};
|
13185
13198
|
|
13186
13199
|
// Copyright (c) Microsoft Corporation.
|
@@ -13278,12 +13291,12 @@ const getFluentUIAttachedValue = (messageAttachedStatus) => {
|
|
13278
13291
|
function getMessageBubbleContent(message, strings, userId, inlineImageOptions,
|
13279
13292
|
/* @conditional-compile-remove(mention) */
|
13280
13293
|
mentionDisplayOptions,
|
13281
|
-
/* @conditional-compile-remove(
|
13294
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13282
13295
|
/**
|
13283
13296
|
* Optional callback to render message attachments in the message component.
|
13284
13297
|
*/
|
13285
13298
|
onRenderAttachmentDownloads,
|
13286
|
-
/* @conditional-compile-remove(
|
13299
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13287
13300
|
/**
|
13288
13301
|
* Optional callback to define custom actions for attachments.
|
13289
13302
|
*/
|
@@ -13297,27 +13310,28 @@ actionsForAttachment) {
|
|
13297
13310
|
React.createElement(ChatMessageContent, { message: message, strings: strings,
|
13298
13311
|
/* @conditional-compile-remove(mention) */
|
13299
13312
|
mentionDisplayOptions: mentionDisplayOptions, inlineImageOptions: inlineImageOptions }),
|
13300
|
-
/* @conditional-compile-remove(
|
13313
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */ onRenderAttachmentDownloads
|
13301
13314
|
? onRenderAttachmentDownloads(message)
|
13302
13315
|
: defaultOnRenderAttachmentDownloads(message, strings,
|
13303
|
-
/* @conditional-compile-remove(
|
13316
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13304
13317
|
actionsForAttachment)));
|
13305
13318
|
}
|
13306
13319
|
/**
|
13307
13320
|
* Default component for rendering attachment downloads.
|
13308
13321
|
*/
|
13309
|
-
/* @conditional-compile-remove(
|
13322
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13310
13323
|
const defaultOnRenderAttachmentDownloads = (message, strings, actionsForAttachment) => {
|
13311
13324
|
var _a;
|
13312
13325
|
const attachments = 'attachments' in message ? message.attachments : undefined;
|
13313
|
-
/* @conditional-compile-remove(
|
13326
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13314
13327
|
return ((_a = attachments === null || attachments === void 0 ? void 0 : attachments.length) !== null && _a !== void 0 ? _a : 0) > 0 ? (React.createElement(_AttachmentDownloadCards, { message: message,
|
13315
|
-
/* @conditional-compile-remove(
|
13328
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13316
13329
|
attachments: attachments,
|
13317
|
-
/* @conditional-compile-remove(
|
13330
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13318
13331
|
actionsForAttachment: actionsForAttachment,
|
13319
|
-
/* @conditional-compile-remove(
|
13332
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13320
13333
|
strings: {
|
13334
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13321
13335
|
downloadAttachment: strings.downloadAttachment,
|
13322
13336
|
openAttachment: strings.openAttachment,
|
13323
13337
|
attachmentCardGroupMessage: strings.attachmentCardGroupMessage
|
@@ -13363,9 +13377,9 @@ const MessageBubble$1 = (props) => {
|
|
13363
13377
|
const { userId, message, onRemoveClick, onResendClick, disableEditing, showDate, messageContainerStyle, strings, onEditClick, remoteParticipantsCount = 0, onRenderAvatar, showMessageStatus, messageStatus, inlineImageOptions,
|
13364
13378
|
/* @conditional-compile-remove(mention) */
|
13365
13379
|
mentionDisplayOptions, onDisplayDateTimeString,
|
13366
|
-
/* @conditional-compile-remove(
|
13380
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13367
13381
|
onRenderAttachmentDownloads,
|
13368
|
-
/* @conditional-compile-remove(
|
13382
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13369
13383
|
actionsForAttachment } = props;
|
13370
13384
|
const formattedTimestamp = React.useMemo(() => {
|
13371
13385
|
const defaultTimeStamp = message.createdOn
|
@@ -13409,7 +13423,7 @@ const MessageBubble$1 = (props) => {
|
|
13409
13423
|
// or not we need to set the target to undefined here to actually hide the action flyout
|
13410
13424
|
setChatMessageActionFlyoutTarget(undefined);
|
13411
13425
|
}, [setChatMessageActionFlyoutTarget]);
|
13412
|
-
/* @conditional-compile-remove(
|
13426
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13413
13427
|
const hasMultipleAttachments = React.useMemo(() => {
|
13414
13428
|
return doesMessageContainMultipleAttachments(message);
|
13415
13429
|
}, [message]);
|
@@ -13425,16 +13439,16 @@ const MessageBubble$1 = (props) => {
|
|
13425
13439
|
return getMessageBubbleContent(message, strings, userId, inlineImageOptions,
|
13426
13440
|
/* @conditional-compile-remove(mention) */
|
13427
13441
|
mentionDisplayOptions,
|
13428
|
-
/* @conditional-compile-remove(
|
13442
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13429
13443
|
onRenderAttachmentDownloads,
|
13430
|
-
/* @conditional-compile-remove(
|
13444
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13431
13445
|
actionsForAttachment);
|
13432
13446
|
}, [
|
13433
|
-
/* @conditional-compile-remove(
|
13447
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */ actionsForAttachment,
|
13434
13448
|
inlineImageOptions,
|
13435
13449
|
/* @conditional-compile-remove(mention) */ mentionDisplayOptions,
|
13436
13450
|
message,
|
13437
|
-
/* @conditional-compile-remove(
|
13451
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */ onRenderAttachmentDownloads,
|
13438
13452
|
strings,
|
13439
13453
|
userId
|
13440
13454
|
]);
|
@@ -13451,7 +13465,7 @@ const MessageBubble$1 = (props) => {
|
|
13451
13465
|
: props.message.status === 'failed'
|
13452
13466
|
? chatMessageCommonStyles.failed
|
13453
13467
|
: undefined, attached !== 'top' ? chatMyMessageStyles.bodyAttached : undefined,
|
13454
|
-
/* @conditional-compile-remove(
|
13468
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13455
13469
|
hasMultipleAttachments ? chatMyMessageStyles.multipleAttachments : undefined, react.mergeStyles(messageContainerStyle)),
|
13456
13470
|
style: Object.assign({}, createStyleFromV8Style(messageContainerStyle)),
|
13457
13471
|
ref: messageRef
|
@@ -13510,12 +13524,12 @@ const ChatMessageComponentAsEditBox = (props) => {
|
|
13510
13524
|
/* @conditional-compile-remove(mention) */
|
13511
13525
|
const { mentionLookupOptions } = props;
|
13512
13526
|
const [textValue, setTextValue] = React.useState(message.content || '');
|
13513
|
-
/* @conditional-compile-remove(
|
13527
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13514
13528
|
const [attachmentMetadata, handleAttachmentAction] = React.useReducer(attachmentMetadataReducer, (_a = getMessageWithAttachmentMetadata(message)) !== null && _a !== void 0 ? _a : []);
|
13515
13529
|
const editTextFieldRef = React.useRef(null);
|
13516
13530
|
const theme = useTheme();
|
13517
13531
|
const messageState = getMessageState(textValue,
|
13518
|
-
/* @conditional-compile-remove(
|
13532
|
+
/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata !== null && attachmentMetadata !== void 0 ? attachmentMetadata : []);
|
13519
13533
|
const submitEnabled = messageState === 'OK';
|
13520
13534
|
const editContainerStyles = useChatMessageEditContainerStyles();
|
13521
13535
|
const chatMyMessageStyles = useChatMyMessageStyles();
|
@@ -13539,14 +13553,14 @@ const ChatMessageComponentAsEditBox = (props) => {
|
|
13539
13553
|
const onRenderThemedSubmitIcon = React.useCallback((isHover) => {
|
13540
13554
|
return onRenderSubmitIcon(iconClassName(isHover));
|
13541
13555
|
}, [iconClassName]);
|
13542
|
-
/* @conditional-compile-remove(
|
13556
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13543
13557
|
const hasMultipleAttachments = React.useMemo(() => {
|
13544
13558
|
return doesMessageContainMultipleAttachments(message);
|
13545
13559
|
}, [message]);
|
13546
13560
|
const editBoxStyles = React.useMemo(() => {
|
13547
13561
|
return react.concatStyleSets(editBoxStyleSet, { textField: { borderColor: theme.palette.themePrimary } });
|
13548
13562
|
}, [theme.palette.themePrimary]);
|
13549
|
-
/* @conditional-compile-remove(
|
13563
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13550
13564
|
const onRenderAttachmentUploads = React.useCallback(() => {
|
13551
13565
|
return (!!attachmentMetadata &&
|
13552
13566
|
attachmentMetadata.length > 0 && (React.createElement("div", { style: { margin: '0.25rem' } },
|
@@ -13566,7 +13580,7 @@ const ChatMessageComponentAsEditBox = (props) => {
|
|
13566
13580
|
}, onEnterKeyDown: () => {
|
13567
13581
|
submitEnabled &&
|
13568
13582
|
onSubmit(textValue,
|
13569
|
-
/* @conditional-compile-remove(
|
13583
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13570
13584
|
attachmentMetadata);
|
13571
13585
|
}, supportNewline: false, maxLength: MAXIMUM_LENGTH_OF_MESSAGE, errorMessage: textTooLongMessage, styles: editBoxStyles,
|
13572
13586
|
/* @conditional-compile-remove(mention) */
|
@@ -13585,15 +13599,15 @@ const ChatMessageComponentAsEditBox = (props) => {
|
|
13585
13599
|
// if you set it to undefined, the attachments pre-edited would still be there
|
13586
13600
|
// until edit message event is received
|
13587
13601
|
submitEnabled &&
|
13588
|
-
onSubmit(textValue, /* @conditional-compile-remove(
|
13602
|
+
onSubmit(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata);
|
13589
13603
|
e.stopPropagation();
|
13590
|
-
}, id: 'submitIconWrapper' }))), /* @conditional-compile-remove(
|
13604
|
+
}, id: 'submitIconWrapper' }))), /* @conditional-compile-remove(file-sharing-acs) */
|
13591
13605
|
onRenderAttachmentUploads()));
|
13592
13606
|
};
|
13593
13607
|
const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';
|
13594
13608
|
return (React.createElement(reactChat.ChatMyMessage, { attached: attached, root: {
|
13595
13609
|
className: reactComponents.mergeClasses(chatMyMessageStyles.root,
|
13596
|
-
/* @conditional-compile-remove(
|
13610
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13597
13611
|
hasMultipleAttachments ? chatMyMessageStyles.multipleAttachments : undefined)
|
13598
13612
|
}, body: {
|
13599
13613
|
className: reactComponents.mergeClasses(editContainerStyles.body, message.failureReason !== undefined ? editContainerStyles.bodyError : editContainerStyles.bodyDefault, attached !== 'top' ? editContainerStyles.bodyAttached : undefined)
|
@@ -13631,7 +13645,7 @@ class _ErrorBoundary extends React.Component {
|
|
13631
13645
|
// Copyright (c) Microsoft Corporation.
|
13632
13646
|
// Licensed under the MIT License.
|
13633
13647
|
/* @conditional-compile-remove(rich-text-editor) */
|
13634
|
-
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-
|
13648
|
+
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-CueWJlOs.js'); }));
|
13635
13649
|
/**
|
13636
13650
|
* @private
|
13637
13651
|
* Use this function to load RoosterJS dependencies early in the lifecycle.
|
@@ -13639,7 +13653,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
|
|
13639
13653
|
*
|
13640
13654
|
* @conditional-compile-remove(rich-text-editor)
|
13641
13655
|
*/
|
13642
|
-
const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-
|
13656
|
+
const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-CueWJlOs.js'); });
|
13643
13657
|
/**
|
13644
13658
|
* @private
|
13645
13659
|
*/
|
@@ -13689,31 +13703,31 @@ const ChatMyMessageComponent = (props) => {
|
|
13689
13703
|
}
|
13690
13704
|
}, [onDeleteMessage, message.messageId, message.messageType, clientMessageId]);
|
13691
13705
|
const onResendClick = React.useCallback(() => {
|
13692
|
-
/* @conditional-compile-remove(
|
13706
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13693
13707
|
const messageOptions = {
|
13694
13708
|
attachments: `attachments` in message ? message.attachments : undefined
|
13695
13709
|
};
|
13696
13710
|
onDeleteMessage && clientMessageId && onDeleteMessage(clientMessageId);
|
13697
13711
|
onSendMessage &&
|
13698
13712
|
onSendMessage(content !== undefined ? content : '',
|
13699
|
-
/* @conditional-compile-remove(
|
13713
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13700
13714
|
messageOptions);
|
13701
13715
|
}, [onDeleteMessage, clientMessageId, onSendMessage, content, message]);
|
13702
13716
|
const onSubmitHandler = React.useCallback(
|
13703
13717
|
// due to a bug in babel, we can't use arrow function here
|
13704
13718
|
// affecting conditional-compile-remove(attachment-upload)
|
13705
13719
|
function (text,
|
13706
|
-
/* @conditional-compile-remove(
|
13720
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13707
13721
|
attachments) {
|
13708
13722
|
return __awaiter$C(this, void 0, void 0, function* () {
|
13709
|
-
/* @conditional-compile-remove(
|
13723
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13710
13724
|
if (`attachments` in message && attachments) {
|
13711
13725
|
message.attachments = attachments;
|
13712
13726
|
}
|
13713
13727
|
props.onUpdateMessage &&
|
13714
13728
|
message.messageId &&
|
13715
13729
|
(yield props.onUpdateMessage(message.messageId, text,
|
13716
|
-
/* @conditional-compile-remove(
|
13730
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13717
13731
|
{
|
13718
13732
|
attachments: attachments
|
13719
13733
|
}));
|
@@ -13755,19 +13769,19 @@ const FluentChatMyMessageComponent = (props) => {
|
|
13755
13769
|
onDisplayDateTimeString, inlineImageOptions,
|
13756
13770
|
/* @conditional-compile-remove(mention) */
|
13757
13771
|
mentionOptions, userId, defaultStatusRenderer, statusToRender,
|
13758
|
-
/* @conditional-compile-remove(
|
13772
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13759
13773
|
actionsForAttachment,
|
13760
|
-
/* @conditional-compile-remove(
|
13774
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13761
13775
|
onRenderAttachmentDownloads,
|
13762
13776
|
/* @conditional-compile-remove(rich-text-editor) */
|
13763
13777
|
richTextEditor } = props;
|
13764
13778
|
const chatMessageRenderStyles = useChatMessageRenderStyles();
|
13765
|
-
/* @conditional-compile-remove(
|
13779
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13766
13780
|
const onRenderAttachmentDownloadsMemo = React.useMemo(() => {
|
13767
|
-
/* @conditional-compile-remove(
|
13781
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13768
13782
|
return onRenderAttachmentDownloads;
|
13769
13783
|
}, [
|
13770
|
-
/* @conditional-compile-remove(
|
13784
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */ onRenderAttachmentDownloads
|
13771
13785
|
]);
|
13772
13786
|
// To rerender the defaultChatMessageRenderer if app running across days(every new day chat time stamp
|
13773
13787
|
// needs to be regenerated), the dependency on "new Date().toDateString()"" is added.
|
@@ -13775,15 +13789,15 @@ const FluentChatMyMessageComponent = (props) => {
|
|
13775
13789
|
if (messageProps.message.messageType === 'chat' ||
|
13776
13790
|
/* @conditional-compile-remove(data-loss-prevention) */ messageProps.message.messageType === 'blocked') {
|
13777
13791
|
return (React.createElement(ChatMyMessageComponent, Object.assign({}, messageProps, {
|
13778
|
-
/* @conditional-compile-remove(
|
13792
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13779
13793
|
onRenderAttachmentDownloads: onRenderAttachmentDownloadsMemo,
|
13780
|
-
/* @conditional-compile-remove(
|
13794
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13781
13795
|
strings: messageProps.strings, message: messageProps.message, userId: userId, remoteParticipantsCount: participantCount ? participantCount - 1 : 0, shouldOverlapAvatarAndMessage: shouldOverlapAvatarAndMessage, onRenderAvatar: onRenderAvatar, showMessageStatus: showMessageStatus, messageStatus: messageProps.message.status, onActionButtonClick: onActionButtonClick,
|
13782
13796
|
/* @conditional-compile-remove(date-time-customization) */
|
13783
13797
|
onDisplayDateTimeString: onDisplayDateTimeString, inlineImageOptions: inlineImageOptions,
|
13784
13798
|
/* @conditional-compile-remove(mention) */
|
13785
13799
|
mentionOptions: mentionOptions,
|
13786
|
-
/* @conditional-compile-remove(
|
13800
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13787
13801
|
actionsForAttachment: actionsForAttachment,
|
13788
13802
|
/* @conditional-compile-remove(rich-text-editor) */
|
13789
13803
|
richTextEditor: richTextEditor })));
|
@@ -13801,9 +13815,9 @@ const FluentChatMyMessageComponent = (props) => {
|
|
13801
13815
|
inlineImageOptions,
|
13802
13816
|
/* @conditional-compile-remove(mention) */
|
13803
13817
|
mentionOptions,
|
13804
|
-
/* @conditional-compile-remove(
|
13818
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13805
13819
|
onRenderAttachmentDownloadsMemo,
|
13806
|
-
/* @conditional-compile-remove(
|
13820
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13807
13821
|
actionsForAttachment,
|
13808
13822
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
13809
13823
|
new Date().toDateString(),
|
@@ -13867,9 +13881,9 @@ const MessageBubble = (props) => {
|
|
13867
13881
|
const theme = useTheme();
|
13868
13882
|
const locale = useLocale$1();
|
13869
13883
|
const { userId, message, showDate, messageContainerStyle, strings,
|
13870
|
-
/* @conditional-compile-remove(
|
13884
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13871
13885
|
onRenderAttachmentDownloads, inlineImageOptions, shouldOverlapAvatarAndMessage,
|
13872
|
-
/* @conditional-compile-remove(
|
13886
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13873
13887
|
actionsForAttachment,
|
13874
13888
|
/* @conditional-compile-remove(mention) */
|
13875
13889
|
mentionDisplayOptions, onDisplayDateTimeString } = props;
|
@@ -13889,22 +13903,22 @@ const MessageBubble = (props) => {
|
|
13889
13903
|
return getMessageBubbleContent(message, strings, userId, inlineImageOptions,
|
13890
13904
|
/* @conditional-compile-remove(mention) */
|
13891
13905
|
mentionDisplayOptions,
|
13892
|
-
/* @conditional-compile-remove(
|
13906
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13893
13907
|
onRenderAttachmentDownloads,
|
13894
|
-
/* @conditional-compile-remove(
|
13908
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13895
13909
|
actionsForAttachment);
|
13896
13910
|
}, [
|
13897
|
-
/* @conditional-compile-remove(
|
13911
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */ actionsForAttachment,
|
13898
13912
|
inlineImageOptions,
|
13899
13913
|
/* @conditional-compile-remove(mention) */ mentionDisplayOptions,
|
13900
13914
|
message,
|
13901
|
-
/* @conditional-compile-remove(
|
13915
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */ onRenderAttachmentDownloads,
|
13902
13916
|
strings,
|
13903
13917
|
userId
|
13904
13918
|
]);
|
13905
13919
|
const isBlockedMessage = /* @conditional-compile-remove(data-loss-prevention) */ message.messageType === 'blocked';
|
13906
13920
|
const chatMessageCommonStyles = useChatMessageCommonStyles();
|
13907
|
-
/* @conditional-compile-remove(
|
13921
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13908
13922
|
const hasMultipleAttachments = React.useMemo(() => {
|
13909
13923
|
return doesMessageContainMultipleAttachments(message);
|
13910
13924
|
}, [message]);
|
@@ -13916,7 +13930,7 @@ const MessageBubble = (props) => {
|
|
13916
13930
|
: props.message.status === 'failed'
|
13917
13931
|
? chatMessageCommonStyles.failed
|
13918
13932
|
: undefined, shouldOverlapAvatarAndMessage ? chatMessageStyles.avatarOverlap : chatMessageStyles.avatarNoOverlap,
|
13919
|
-
/* @conditional-compile-remove(
|
13933
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
13920
13934
|
hasMultipleAttachments ? chatMessageStyles.multipleAttachments : undefined, message.attached === 'top' || message.attached === false
|
13921
13935
|
? chatMessageStyles.bodyWithAvatar
|
13922
13936
|
: chatMessageStyles.bodyWithoutAvatar,
|
@@ -13950,14 +13964,14 @@ const FluentChatMessageComponent = (props) => {
|
|
13950
13964
|
const { message, styles, shouldOverlapAvatarAndMessage, onRenderMessage, onRenderAvatar,
|
13951
13965
|
/* @conditional-compile-remove(date-time-customization) */
|
13952
13966
|
onDisplayDateTimeString, inlineImageOptions,
|
13953
|
-
/* @conditional-compile-remove(
|
13967
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13954
13968
|
actionsForAttachment, userId,
|
13955
|
-
/* @conditional-compile-remove(
|
13969
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13956
13970
|
onRenderAttachmentDownloads,
|
13957
13971
|
/* @conditional-compile-remove(mention) */
|
13958
13972
|
mentionOptions } = props;
|
13959
13973
|
const chatMessageRenderStyles = useChatMessageRenderStyles();
|
13960
|
-
/* @conditional-compile-remove(
|
13974
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13961
13975
|
const onRenderAttachmentDownloadsMemo = React.useMemo(() => {
|
13962
13976
|
return onRenderAttachmentDownloads;
|
13963
13977
|
}, [onRenderAttachmentDownloads]);
|
@@ -13967,25 +13981,25 @@ const FluentChatMessageComponent = (props) => {
|
|
13967
13981
|
if (messageProps.message.messageType === 'chat' ||
|
13968
13982
|
/* @conditional-compile-remove(data-loss-prevention) */ messageProps.message.messageType === 'blocked') {
|
13969
13983
|
return (React.createElement(ChatMessageComponentAsMessageBubble, Object.assign({}, messageProps, {
|
13970
|
-
/* @conditional-compile-remove(
|
13984
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13971
13985
|
onRenderAttachmentDownloads: onRenderAttachmentDownloadsMemo, strings: messageProps.strings, message: messageProps.message, userId: userId, shouldOverlapAvatarAndMessage: shouldOverlapAvatarAndMessage,
|
13972
13986
|
/* @conditional-compile-remove(date-time-customization) */
|
13973
13987
|
onDisplayDateTimeString: onDisplayDateTimeString, inlineImageOptions: inlineImageOptions,
|
13974
|
-
/* @conditional-compile-remove(
|
13988
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13975
13989
|
actionsForAttachment: actionsForAttachment,
|
13976
13990
|
/* @conditional-compile-remove(mention) */
|
13977
13991
|
mentionDisplayOptions: mentionOptions === null || mentionOptions === void 0 ? void 0 : mentionOptions.displayOptions })));
|
13978
13992
|
}
|
13979
13993
|
return React.createElement(React.Fragment, null);
|
13980
13994
|
}, [
|
13981
|
-
/* @conditional-compile-remove(
|
13995
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13982
13996
|
onRenderAttachmentDownloadsMemo,
|
13983
13997
|
userId,
|
13984
13998
|
shouldOverlapAvatarAndMessage,
|
13985
13999
|
/* @conditional-compile-remove(date-time-customization) */
|
13986
14000
|
onDisplayDateTimeString,
|
13987
14001
|
inlineImageOptions,
|
13988
|
-
/* @conditional-compile-remove(
|
14002
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
13989
14003
|
actionsForAttachment,
|
13990
14004
|
/* @conditional-compile-remove(mention) */
|
13991
14005
|
mentionOptions === null || mentionOptions === void 0 ? void 0 : mentionOptions.displayOptions
|
@@ -14269,9 +14283,9 @@ const MessageThreadWrapper = (props) => {
|
|
14269
14283
|
onDisplayDateTimeString,
|
14270
14284
|
/* @conditional-compile-remove(mention) */
|
14271
14285
|
mentionOptions, inlineImageOptions,
|
14272
|
-
/* @conditional-compile-remove(
|
14286
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
14273
14287
|
attachmentOptions,
|
14274
|
-
/* @conditional-compile-remove(
|
14288
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
14275
14289
|
onRenderAttachmentDownloads,
|
14276
14290
|
/* @conditional-compile-remove(rich-text-editor) */
|
14277
14291
|
richTextEditor = false } = props;
|
@@ -14619,13 +14633,13 @@ const MessageThreadWrapper = (props) => {
|
|
14619
14633
|
messagesToDisplay.map((message) => {
|
14620
14634
|
var _a;
|
14621
14635
|
return (React.createElement(MemoChatMessageComponentWrapper, Object.assign({}, message, { userId: userId, key: message.key, styles: styles, shouldOverlapAvatarAndMessage: isNarrow, strings: strings, onRenderAvatar: onRenderAvatar, onRenderMessage: onRenderMessage, onRenderMessageStatus: onRenderMessageStatus, defaultStatusRenderer: defaultStatusRenderer, onActionButtonClick: onActionButtonClickMemo, readCount: readCountForHoveredIndicator, participantCount: participantCount,
|
14622
|
-
/* @conditional-compile-remove(
|
14636
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
14623
14637
|
actionsForAttachment: (_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.downloadOptions) === null || _a === void 0 ? void 0 : _a.actionsForAttachment, inlineImageOptions: inlineImageOptions,
|
14624
14638
|
/* @conditional-compile-remove(date-time-customization) */
|
14625
14639
|
onDisplayDateTimeString: onDisplayDateTimeString,
|
14626
14640
|
/* @conditional-compile-remove(mention) */
|
14627
14641
|
mentionOptions: mentionOptions,
|
14628
|
-
/* @conditional-compile-remove(
|
14642
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
14629
14643
|
onRenderAttachmentDownloads: onRenderAttachmentDownloads,
|
14630
14644
|
/* @conditional-compile-remove(rich-text-editor) */
|
14631
14645
|
richTextEditor: richTextEditor })));
|
@@ -24262,7 +24276,7 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
|
|
24262
24276
|
content,
|
24263
24277
|
senderDisplayName: chatClient.getState().displayName
|
24264
24278
|
};
|
24265
|
-
/* @conditional-compile-remove(
|
24279
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
24266
24280
|
if (options &&
|
24267
24281
|
'attachments' in options &&
|
24268
24282
|
options.attachments &&
|
@@ -24280,16 +24294,16 @@ const createDefaultChatHandlers = memoizeOne((chatClient, chatThreadClient) => {
|
|
24280
24294
|
// due to a bug in babel, we can't use arrow function here
|
24281
24295
|
// affecting conditional-compile-remove(attachment-upload)
|
24282
24296
|
onUpdateMessage: function (messageId, content,
|
24283
|
-
/* @conditional-compile-remove(
|
24297
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
24284
24298
|
options) {
|
24285
24299
|
return __awaiter$v(this, void 0, void 0, function* () {
|
24286
|
-
/* @conditional-compile-remove(
|
24300
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
24287
24301
|
const updateMessageOptions = {
|
24288
24302
|
content,
|
24289
24303
|
metadata: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.metadata), { fileSharingMetadata: JSON.stringify(options === null || options === void 0 ? void 0 : options.attachments) })
|
24290
24304
|
};
|
24291
24305
|
yield chatThreadClient.updateMessage(messageId,
|
24292
|
-
/* @conditional-compile-remove(
|
24306
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
24293
24307
|
updateMessageOptions);
|
24294
24308
|
});
|
24295
24309
|
},
|
@@ -24666,7 +24680,7 @@ const memoizedAllConvertChatMessage = memoizeFnAll((_key, chatMessage, userId, i
|
|
24666
24680
|
return convertToUiSystemMessage(chatMessage);
|
24667
24681
|
}
|
24668
24682
|
});
|
24669
|
-
/* @conditional-compile-remove(
|
24683
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
24670
24684
|
const extractAttachmentMetadata = (metadata) => {
|
24671
24685
|
const attachmentMetadata = metadata.fileSharingMetadata;
|
24672
24686
|
if (!attachmentMetadata) {
|
@@ -24680,7 +24694,7 @@ const extractAttachmentMetadata = (metadata) => {
|
|
24680
24694
|
return [];
|
24681
24695
|
}
|
24682
24696
|
};
|
24683
|
-
/* @conditional-compile-remove(
|
24697
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
24684
24698
|
const extractTeamsAttachmentsMetadata = (rawAttachments) => {
|
24685
24699
|
const attachments = [];
|
24686
24700
|
rawAttachments.forEach((rawAttachment) => {
|
@@ -24714,7 +24728,7 @@ const convertToUiBlockedMessage = (message, userId, isSeen, isLargeGroup) => {
|
|
24714
24728
|
link: DEFAULT_DATA_LOSS_PREVENTION_POLICY_URL
|
24715
24729
|
};
|
24716
24730
|
};
|
24717
|
-
/* @conditional-compile-remove(
|
24731
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
24718
24732
|
const extractAttachmentUrl = (attachment) => {
|
24719
24733
|
return attachment.previewUrl ? attachment.previewUrl : attachment.url || '';
|
24720
24734
|
};
|
@@ -24787,7 +24801,7 @@ const extractAttachmentContentTypeFromName = (name) => {
|
|
24787
24801
|
const contentType = name.substring(indexOfLastDot + 1);
|
24788
24802
|
return contentType;
|
24789
24803
|
};
|
24790
|
-
/* @conditional-compile-remove(
|
24804
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
24791
24805
|
const extractAttachmentsMetadata = (message) => {
|
24792
24806
|
var _a, _b;
|
24793
24807
|
let attachments = [];
|
@@ -24802,7 +24816,7 @@ const extractAttachmentsMetadata = (message) => {
|
|
24802
24816
|
};
|
24803
24817
|
const convertToUiChatMessage = (message, userId, isSeen, isLargeGroup) => {
|
24804
24818
|
const messageSenderId = message.sender !== undefined ? toFlatCommunicationIdentifier(message.sender) : userId;
|
24805
|
-
/* @conditional-compile-remove(
|
24819
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
24806
24820
|
const { attachments } = extractAttachmentsMetadata(message);
|
24807
24821
|
return {
|
24808
24822
|
messageType: 'chat',
|
@@ -24818,7 +24832,7 @@ const convertToUiChatMessage = (message, userId, isSeen, isLargeGroup) => {
|
|
24818
24832
|
deletedOn: message.deletedOn,
|
24819
24833
|
mine: messageSenderId === userId,
|
24820
24834
|
metadata: message.metadata,
|
24821
|
-
/* @conditional-compile-remove(
|
24835
|
+
/* @conditional-compile-remove(file-sharing-teams-interop) @conditional-compile-remove(file-sharing-acs) */
|
24822
24836
|
attachments
|
24823
24837
|
};
|
24824
24838
|
};
|
@@ -26550,7 +26564,7 @@ class ChatContext {
|
|
26550
26564
|
thread,
|
26551
26565
|
latestErrors: clientState.latestErrors
|
26552
26566
|
};
|
26553
|
-
/* @conditional-compile-remove(
|
26567
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
26554
26568
|
updatedState = Object.assign({}, updatedState);
|
26555
26569
|
this.setState(updatedState);
|
26556
26570
|
}
|
@@ -26684,30 +26698,30 @@ class AzureCommunicationChatAdapter {
|
|
26684
26698
|
return __awaiter$o(this, void 0, void 0, function* () {
|
26685
26699
|
return yield this.asyncTeeErrorToEventEmitter(() => __awaiter$o(this, void 0, void 0, function* () {
|
26686
26700
|
var _a;
|
26687
|
-
/* @conditional-compile-remove(
|
26701
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
26688
26702
|
const messageOptions = {};
|
26689
|
-
/* @conditional-compile-remove(
|
26703
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
26690
26704
|
if (options &&
|
26691
26705
|
// if options.attachments is an array or undefined (for removal all attachments),
|
26692
26706
|
// then given options is a MessageOptions
|
26693
26707
|
(Array.isArray(options.attachments) || options.attachments === undefined)) {
|
26694
26708
|
messageOptions.attachments = (_a = options.attachments) !== null && _a !== void 0 ? _a : [];
|
26695
26709
|
}
|
26696
|
-
/* @conditional-compile-remove(
|
26710
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
26697
26711
|
if (options &&
|
26698
26712
|
// if options.metadata is provided, we need to add it in MessageOptions
|
26699
26713
|
options.metadata &&
|
26700
26714
|
typeof options.metadata === 'object') {
|
26701
26715
|
messageOptions.metadata = options.metadata;
|
26702
26716
|
}
|
26703
|
-
/* @conditional-compile-remove(
|
26717
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
26704
26718
|
if (options && !('attachments' in options) && !('metadata' in options)) {
|
26705
26719
|
// if options don't have attachments or metadata,
|
26706
26720
|
// then it is a Record<string, string>
|
26707
|
-
/* @conditional-compile-remove(
|
26721
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
26708
26722
|
return yield this.handlers.onUpdateMessage(messageId, content, options);
|
26709
26723
|
}
|
26710
|
-
/* @conditional-compile-remove(
|
26724
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
26711
26725
|
return yield this.handlers.onUpdateMessage(messageId, content, messageOptions);
|
26712
26726
|
}));
|
26713
26727
|
});
|
@@ -27088,7 +27102,7 @@ const COMPOSITE_ONLY_ICONS = {
|
|
27088
27102
|
NoticePageRoomNotValid: React.createElement(reactIcons.Info20Filled, null),
|
27089
27103
|
NoticePageCallRejected: React.createElement(reactIcons.Info20Filled, null),
|
27090
27104
|
NoticePageCallTimeout: React.createElement(reactIcons.Info20Filled, null),
|
27091
|
-
/* @conditional-compile-remove(
|
27105
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27092
27106
|
SendBoxAttachFile: React.createElement(reactIcons.Attach20Regular, null),
|
27093
27107
|
/* @conditional-compile-remove(PSTN-calls) */
|
27094
27108
|
PeoplePaneAddPerson: React.createElement(reactIcons.PersonAdd20Regular, null),
|
@@ -27473,6 +27487,7 @@ var AttachmentUploadActionType;
|
|
27473
27487
|
AttachmentUploadActionType["Remove"] = "remove";
|
27474
27488
|
AttachmentUploadActionType["Clear"] = "clear";
|
27475
27489
|
})(AttachmentUploadActionType || (AttachmentUploadActionType = {}));
|
27490
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27476
27491
|
/**
|
27477
27492
|
* @internal
|
27478
27493
|
*/
|
@@ -27501,6 +27516,8 @@ const AttachmentUploadReducer = (state, action) => {
|
|
27501
27516
|
|
27502
27517
|
// Copyright (c) Microsoft Corporation.
|
27503
27518
|
// Licensed under the MIT License.
|
27519
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27520
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27504
27521
|
/**
|
27505
27522
|
* @internal
|
27506
27523
|
*/
|
@@ -27542,10 +27559,12 @@ const AttachmentUploadButton = (props) => {
|
|
27542
27559
|
onChange && onChange(e.currentTarget.files);
|
27543
27560
|
} })));
|
27544
27561
|
};
|
27562
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27545
27563
|
const SendBoxAttachFileIconTrampoline = () => {
|
27546
|
-
/* @conditional-compile-remove(
|
27564
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27547
27565
|
return React.createElement(ChatCompositeIcon, { iconName: "SendBoxAttachFile" });
|
27548
27566
|
};
|
27567
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27549
27568
|
/**
|
27550
27569
|
* A wrapper to return {@link AttachmentUploadButton} component conditionally.
|
27551
27570
|
* It will return `<></>` for stable builds.
|
@@ -27556,11 +27575,12 @@ const AttachmentUploadButtonWrapper = (
|
|
27556
27575
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
27557
27576
|
props) => {
|
27558
27577
|
return (React.createElement(React.Fragment, null,
|
27559
|
-
/* @conditional-compile-remove(
|
27578
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27560
27579
|
React.createElement(AttachmentUploadButton, Object.assign({}, props))));
|
27561
27580
|
};
|
27581
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27562
27582
|
const uploadAttachmentButtonStringTrampoline = () => {
|
27563
|
-
/* @conditional-compile-remove(
|
27583
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27564
27584
|
//eslint-disable-next-line react-hooks/rules-of-hooks
|
27565
27585
|
return useLocale().strings.chat.uploadAttachment;
|
27566
27586
|
};
|
@@ -27651,7 +27671,7 @@ const createCompositeHandlers$1 = memoizeOne((adapter) => ({
|
|
27651
27671
|
// have to use `any` here so we don't import from Chat SDK
|
27652
27672
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
27653
27673
|
onSendMessage: (content, options) => {
|
27654
|
-
/* @conditional-compile-remove(
|
27674
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27655
27675
|
if (options &&
|
27656
27676
|
'attachments' in options &&
|
27657
27677
|
options.attachments &&
|
@@ -27670,14 +27690,14 @@ const createCompositeHandlers$1 = memoizeOne((adapter) => ({
|
|
27670
27690
|
onRemoveParticipant: adapter.removeParticipant,
|
27671
27691
|
updateThreadTopicName: adapter.setTopic,
|
27672
27692
|
onUpdateMessage: function (messageId, content,
|
27673
|
-
/* @conditional-compile-remove(
|
27693
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27674
27694
|
options) {
|
27675
|
-
/* @conditional-compile-remove(
|
27695
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27676
27696
|
const adapterMessageOptions = {
|
27677
27697
|
attachments: options === null || options === void 0 ? void 0 : options.attachments
|
27678
27698
|
};
|
27679
27699
|
return adapter.updateMessage(messageId, content,
|
27680
|
-
/* @conditional-compile-remove(
|
27700
|
+
/* @conditional-compile-remove(file-sharing-acs) */ adapterMessageOptions);
|
27681
27701
|
},
|
27682
27702
|
onDeleteMessage: adapter.deleteMessage
|
27683
27703
|
}));
|
@@ -27944,7 +27964,7 @@ const AttachmentDownloadErrorBar = (props) => {
|
|
27944
27964
|
/**
|
27945
27965
|
* Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
|
27946
27966
|
*/
|
27947
|
-
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-
|
27967
|
+
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DORQ6cdT.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
|
27948
27968
|
/**
|
27949
27969
|
* @private
|
27950
27970
|
* Use this function to load RoosterJS dependencies early in the lifecycle.
|
@@ -27952,7 +27972,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
|
|
27952
27972
|
*
|
27953
27973
|
/* @conditional-compile-remove(rich-text-editor-composite-support)
|
27954
27974
|
*/
|
27955
|
-
const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-
|
27975
|
+
const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DORQ6cdT.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
|
27956
27976
|
/**
|
27957
27977
|
* @private
|
27958
27978
|
*/
|
@@ -27991,13 +28011,15 @@ var __awaiter$m = (window && window.__awaiter) || function (thisArg, _arguments,
|
|
27991
28011
|
*/
|
27992
28012
|
const ChatScreen = (props) => {
|
27993
28013
|
var _a, _b, _c, _d;
|
27994
|
-
const { onFetchAvatarPersonaData, onRenderMessage, onRenderTypingIndicator, options, styles,
|
28014
|
+
const { onFetchAvatarPersonaData, onRenderMessage, onRenderTypingIndicator, options, styles,
|
28015
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28016
|
+
attachmentOptions, formFactor } = props;
|
27995
28017
|
const defaultNumberOfChatMessagesToReload = 5;
|
27996
|
-
/* @conditional-compile-remove(
|
28018
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
27997
28019
|
const [downloadErrorMessage, setDownloadErrorMessage] = React.useState('');
|
27998
28020
|
const [overlayImageItem, setOverlayImageItem] = React.useState();
|
27999
28021
|
const [isImageOverlayOpen, setIsImageOverlayOpen] = React.useState(false);
|
28000
|
-
/* @conditional-compile-remove(
|
28022
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28001
28023
|
const [uploads, handleUploadAction] = React.useReducer(AttachmentUploadReducer, []);
|
28002
28024
|
const adapter = useAdapter$1();
|
28003
28025
|
const theme = useTheme();
|
@@ -28066,7 +28088,7 @@ const ChatScreen = (props) => {
|
|
28066
28088
|
return Object.assign({}, styles === null || styles === void 0 ? void 0 : styles.sendBox);
|
28067
28089
|
}, [styles === null || styles === void 0 ? void 0 : styles.sendBox]);
|
28068
28090
|
const userId = toFlatCommunicationIdentifier(adapter.getState().userId);
|
28069
|
-
/* @conditional-compile-remove(
|
28091
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28070
28092
|
const attachmentUploadButtonOnChange = React.useCallback((files) => {
|
28071
28093
|
var _a;
|
28072
28094
|
if (!files) {
|
@@ -28102,7 +28124,7 @@ const ChatScreen = (props) => {
|
|
28102
28124
|
handleUploadAction({ type: AttachmentUploadActionType.Set, newUploads });
|
28103
28125
|
(_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _a === void 0 ? void 0 : _a.handleAttachmentSelection(newUploads);
|
28104
28126
|
}, [attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions]);
|
28105
|
-
/* @conditional-compile-remove(
|
28127
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28106
28128
|
const onRenderAttachmentDownloads = React.useCallback((message) => {
|
28107
28129
|
var _a, _b, _c;
|
28108
28130
|
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) => {
|
@@ -28197,44 +28219,42 @@ const ChatScreen = (props) => {
|
|
28197
28219
|
document.body.removeChild(a);
|
28198
28220
|
}
|
28199
28221
|
}, [overlayImageItem === null || overlayImageItem === void 0 ? void 0 : overlayImageItem.attachmentId]);
|
28222
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28200
28223
|
const AttachmentButton = React.useCallback(() => {
|
28201
28224
|
var _a, _b, _c;
|
28202
|
-
/* @conditional-compile-remove(attachment-upload) */
|
28203
28225
|
if (!((_a = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _a === void 0 ? void 0 : _a.handleAttachmentSelection)) {
|
28204
28226
|
return null;
|
28205
28227
|
}
|
28206
|
-
/* @conditional-compile-remove(attachment-upload) */
|
28207
28228
|
return (React.createElement(AttachmentUploadButtonWrapper, { 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 }));
|
28208
28229
|
}, [
|
28209
28230
|
(_b = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _b === void 0 ? void 0 : _b.handleAttachmentSelection,
|
28210
28231
|
(_c = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _c === void 0 ? void 0 : _c.supportedMediaTypes,
|
28211
28232
|
(_d = attachmentOptions === null || attachmentOptions === void 0 ? void 0 : attachmentOptions.uploadOptions) === null || _d === void 0 ? void 0 : _d.disableMultipleUploads,
|
28212
|
-
/* @conditional-compile-remove(attachment-upload) */
|
28213
28233
|
attachmentUploadButtonOnChange
|
28214
28234
|
]);
|
28215
|
-
/* @conditional-compile-remove(
|
28235
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28216
28236
|
const attachments = React.useMemo(() => {
|
28217
28237
|
return uploads === null || uploads === void 0 ? void 0 : uploads.map((v) => v.metadata);
|
28218
28238
|
}, [uploads]);
|
28219
28239
|
const onSendMessageHandler = React.useCallback(function (content,
|
28220
|
-
/* @conditional-compile-remove(
|
28240
|
+
/* @conditional-compile-remove(file-sharing-acs) */ /* @conditional-compile-remove(rich-text-editor-composite-support) */ options) {
|
28221
28241
|
return __awaiter$m(this, void 0, void 0, function* () {
|
28222
28242
|
var _a;
|
28223
|
-
/* @conditional-compile-remove(
|
28243
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28224
28244
|
const attachments = (_a = options === null || options === void 0 ? void 0 : options.attachments) !== null && _a !== void 0 ? _a : [];
|
28225
|
-
/* @conditional-compile-remove(
|
28245
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28226
28246
|
handleUploadAction({ type: AttachmentUploadActionType.Clear });
|
28227
|
-
/* @conditional-compile-remove(
|
28247
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28228
28248
|
yield adapter.sendMessage(content, {
|
28229
28249
|
attachments: attachments,
|
28230
28250
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
28231
28251
|
type: options === null || options === void 0 ? void 0 : options.type
|
28232
28252
|
});
|
28233
|
-
/* @conditional-compile-remove(
|
28253
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28234
28254
|
return;
|
28235
28255
|
});
|
28236
28256
|
}, [adapter]);
|
28237
|
-
/* @conditional-compile-remove(
|
28257
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28238
28258
|
const onCancelUploadHandler = React.useCallback((id) => {
|
28239
28259
|
var _a, _b;
|
28240
28260
|
handleUploadAction({ type: AttachmentUploadActionType.Remove, id });
|
@@ -28245,32 +28265,36 @@ const ChatScreen = (props) => {
|
|
28245
28265
|
React.createElement(react.Stack, { className: chatArea, tokens: participantListContainerPadding, horizontal: true, grow: true },
|
28246
28266
|
React.createElement(react.Stack, { className: chatWrapper, grow: true },
|
28247
28267
|
(options === null || options === void 0 ? void 0 : options.errorBar) !== false && React.createElement(ErrorBar, Object.assign({}, errorBarProps)),
|
28248
|
-
/* @conditional-compile-remove(
|
28268
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28249
28269
|
React.createElement(AttachmentDownloadErrorBar, { onDismissDownloadErrorMessage: React.useCallback(() => {
|
28250
28270
|
setDownloadErrorMessage('');
|
28251
28271
|
}, []), attachmentDownloadErrorMessage: downloadErrorMessage || '' }),
|
28252
28272
|
React.createElement(MessageThread, Object.assign({}, messageThreadProps, { onRenderAvatar: onRenderAvatarCallback, onRenderMessage: onRenderMessage,
|
28253
|
-
/* @conditional-compile-remove(
|
28273
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28254
28274
|
onRenderAttachmentDownloads: onRenderAttachmentDownloads, inlineImageOptions: inlineImageOptions, numberOfChatMessagesToReload: defaultNumberOfChatMessagesToReload, styles: messageThreadStyles,
|
28255
28275
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
28256
28276
|
richTextEditor: options === null || options === void 0 ? void 0 : options.richTextEditor })),
|
28257
28277
|
React.createElement(react.Stack, { className: react.mergeStyles(sendboxContainerStyles) },
|
28258
28278
|
React.createElement("div", { className: react.mergeStyles(typingIndicatorContainerStyles) }, onRenderTypingIndicator ? (onRenderTypingIndicator(typingIndicatorProps.typingUsers)) : (React.createElement(TypingIndicator, Object.assign({}, typingIndicatorProps, { styles: typingIndicatorStyles })))),
|
28259
28279
|
React.createElement(react.Stack, { horizontal: formFactor === 'mobile' },
|
28260
|
-
formFactor === 'mobile' && (
|
28280
|
+
formFactor === 'mobile' && (
|
28281
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28282
|
+
React.createElement(react.Stack, { verticalAlign: "center" },
|
28261
28283
|
React.createElement(AttachmentButton, null))),
|
28262
28284
|
React.createElement(react.Stack, { grow: true },
|
28263
28285
|
React.createElement(SendBoxPicker, { styles: sendBoxStyles, autoFocus: options === null || options === void 0 ? void 0 : options.autoFocus,
|
28264
28286
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
28265
28287
|
richTextEditor: options === null || options === void 0 ? void 0 : options.richTextEditor,
|
28266
|
-
/* @conditional-compile-remove(
|
28288
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28267
28289
|
attachments: attachments,
|
28268
|
-
/* @conditional-compile-remove(
|
28290
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28269
28291
|
onCancelAttachmentUpload: onCancelUploadHandler,
|
28270
28292
|
// we need to overwrite onSendMessage for SendBox because we need to clear attachment state
|
28271
28293
|
// when submit button is clicked
|
28272
28294
|
onSendMessage: onSendMessageHandler })),
|
28273
|
-
formFactor !== 'mobile' &&
|
28295
|
+
formFactor !== 'mobile' && (
|
28296
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28297
|
+
React.createElement(AttachmentButton, null))))),
|
28274
28298
|
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
28275
28299
|
(options === null || options === void 0 ? void 0 : options.participantPane) === true && (React.createElement(ChatScreenPeoplePane, { onFetchAvatarPersonaData: onFetchAvatarPersonaData, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, isMobile: formFactor === 'mobile' }))),
|
28276
28300
|
overlayImageItem && (React.createElement(ImageOverlay, Object.assign({}, overlayImageItem, { isOpen: isImageOverlayOpen, onDismiss: () => {
|
@@ -28295,17 +28319,17 @@ const ChatScreen = (props) => {
|
|
28295
28319
|
*/
|
28296
28320
|
const ChatComposite = (props) => {
|
28297
28321
|
const { adapter, options, onFetchAvatarPersonaData, onRenderTypingIndicator, onRenderMessage, onFetchParticipantMenuItems } = props;
|
28298
|
-
/* @conditional-compile-remove(
|
28322
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28299
28323
|
const formFactor = props['formFactor'] || 'desktop';
|
28300
28324
|
return (React.createElement("div", { className: chatScreenContainerStyle },
|
28301
28325
|
React.createElement(BaseProvider, Object.assign({}, props),
|
28302
28326
|
React.createElement(ChatAdapterProvider, { adapter: adapter },
|
28303
28327
|
React.createElement(ChatScreen
|
28304
|
-
/* @conditional-compile-remove(
|
28328
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28305
28329
|
, {
|
28306
|
-
/* @conditional-compile-remove(
|
28330
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28307
28331
|
formFactor: formFactor, options: options, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onRenderTypingIndicator: onRenderTypingIndicator, onRenderMessage: onRenderMessage, onFetchParticipantMenuItems: onFetchParticipantMenuItems,
|
28308
|
-
/* @conditional-compile-remove(
|
28332
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
28309
28333
|
attachmentOptions: options === null || options === void 0 ? void 0 : options.attachmentOptions })))));
|
28310
28334
|
};
|
28311
28335
|
|
@@ -38594,10 +38618,10 @@ class CallWithChatBackedChatAdapter {
|
|
38594
38618
|
// affecting conditional-compile-remove(attachment-upload)
|
38595
38619
|
// have to bind this since the scope of 'this' is lost when the function is passed as a callback
|
38596
38620
|
this.sendMessageHandler = function (content,
|
38597
|
-
/* @conditional-compile-remove(
|
38621
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
38598
38622
|
options) {
|
38599
38623
|
return __awaiter$3(this, void 0, void 0, function* () {
|
38600
|
-
yield this.callWithChatAdapter.sendMessage(content, /* @conditional-compile-remove(
|
38624
|
+
yield this.callWithChatAdapter.sendMessage(content, /* @conditional-compile-remove(file-sharing-acs) */ options);
|
38601
38625
|
});
|
38602
38626
|
};
|
38603
38627
|
this.sendMessage = this.sendMessageHandler.bind(this);
|
@@ -39003,13 +39027,13 @@ const CallWithChatScreen = (props) => {
|
|
39003
39027
|
topic: false,
|
39004
39028
|
/* @conditional-compile-remove(chat-composite-participant-pane) */
|
39005
39029
|
participantPane: false,
|
39006
|
-
/* @conditional-compile-remove(
|
39030
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
39007
39031
|
attachmentOptions: props.attachmentOptions,
|
39008
39032
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */
|
39009
39033
|
richTextEditor: props.richTextEditor
|
39010
39034
|
}, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData })), [
|
39011
39035
|
chatAdapter,
|
39012
|
-
/* @conditional-compile-remove(
|
39036
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
39013
39037
|
props.attachmentOptions,
|
39014
39038
|
props.onFetchAvatarPersonaData,
|
39015
39039
|
/* @conditional-compile-remove(rich-text-editor-composite-support) */ props.richTextEditor,
|
@@ -39061,7 +39085,7 @@ const CallWithChatComposite = (props) => {
|
|
39061
39085
|
React.createElement(CallWithChatScreen, Object.assign({}, props, {
|
39062
39086
|
/* @conditional-compile-remove(call-readiness) */
|
39063
39087
|
deviceChecks: options === null || options === void 0 ? void 0 : options.deviceChecks, callWithChatAdapter: adapter, formFactor: formFactor, callControls: options === null || options === void 0 ? void 0 : options.callControls, joinInvitationURL: joinInvitationURL, fluentTheme: fluentTheme, remoteVideoTileMenuOptions: options === null || options === void 0 ? void 0 : options.remoteVideoTileMenuOptions,
|
39064
|
-
/* @conditional-compile-remove(
|
39088
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
39065
39089
|
attachmentOptions: options === null || options === void 0 ? void 0 : options.attachmentOptions, localVideoTile: options === null || options === void 0 ? void 0 : options.localVideoTile, galleryOptions: options === null || options === void 0 ? void 0 : options.galleryOptions, logo: (_a = options === null || options === void 0 ? void 0 : options.branding) === null || _a === void 0 ? void 0 : _a.logo, backgroundImage: (_b = options === null || options === void 0 ? void 0 : options.branding) === null || _b === void 0 ? void 0 : _b.backgroundImage, surveyOptions: options === null || options === void 0 ? void 0 : options.surveyOptions,
|
39066
39090
|
/* @conditional-compile-remove(spotlight) */
|
39067
39091
|
spotlight: options === null || options === void 0 ? void 0 : options.spotlight }))));
|
@@ -39467,11 +39491,11 @@ class AzureCommunicationCallWithChatAdapter {
|
|
39467
39491
|
}
|
39468
39492
|
/** Send a chat message. */
|
39469
39493
|
sendMessage(content,
|
39470
|
-
/* @conditional-compile-remove(
|
39494
|
+
/* @conditional-compile-remove(file-sharing-acs) */
|
39471
39495
|
options) {
|
39472
39496
|
return __awaiter$2(this, void 0, void 0, function* () {
|
39473
39497
|
return yield this.executeWithResolvedChatAdapter((adapter) => {
|
39474
|
-
return adapter.sendMessage(content, /* @conditional-compile-remove(
|
39498
|
+
return adapter.sendMessage(content, /* @conditional-compile-remove(file-sharing-acs) */ options);
|
39475
39499
|
});
|
39476
39500
|
});
|
39477
39501
|
}
|
@@ -40687,4 +40711,4 @@ exports.useTeamsCall = useTeamsCall;
|
|
40687
40711
|
exports.useTeamsCallAdapter = useTeamsCallAdapter;
|
40688
40712
|
exports.useTeamsCallAgent = useTeamsCallAgent;
|
40689
40713
|
exports.useTheme = useTheme;
|
40690
|
-
//# sourceMappingURL=index-
|
40714
|
+
//# sourceMappingURL=index-B4rHuheV.js.map
|