@azure/communication-react 1.21.0-alpha-202410240016 → 1.21.0-alpha-202410250016
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 +10 -3
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DMypxgeJ.js → ChatMessageComponentAsRichTextEditBox-DeQgD3wS.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DMypxgeJ.js.map → ChatMessageComponentAsRichTextEditBox-DeQgD3wS.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CKSPOu5D.js → RichTextSendBoxWrapper-DKalJ_L9.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CKSPOu5D.js.map → RichTextSendBoxWrapper-DKalJ_L9.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-B2OZ_HmN.js → index-CsXx8T94.js} +62 -32
- package/dist/dist-cjs/communication-react/index-CsXx8T94.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +21 -17
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +7 -2
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +17 -3
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +8 -2
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js +2 -1
- package/dist/dist-esm/calling-stateful-client/src/UserFacingDiagnosticsSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js +3 -4
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js +4 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoStreamLifecycleMaintainer.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/useVideoTileContextualMenuProps.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/Logger.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/utils/Logger.js +8 -0
- package/dist/dist-esm/react-components/src/components/utils/Logger.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +2 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +2 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-B2OZ_HmN.js.map +0 -1
@@ -10795,11 +10795,18 @@ export declare interface RecordingCallFeature {
|
|
10795
10795
|
* @beta
|
10796
10796
|
*/
|
10797
10797
|
export declare type RemoteDiagnosticState = {
|
10798
|
-
readonly diagnostic:
|
10798
|
+
readonly diagnostic: RemoteDiagnosticType;
|
10799
10799
|
readonly value: DiagnosticQuality | DiagnosticFlag;
|
10800
10800
|
readonly valueType: DiagnosticValueType;
|
10801
10801
|
};
|
10802
10802
|
|
10803
|
+
/**
|
10804
|
+
* All type names for {@link @azure/communication-calling#RemoteDiagnosticState}.
|
10805
|
+
*
|
10806
|
+
* @beta
|
10807
|
+
*/
|
10808
|
+
export declare type RemoteDiagnosticType = NetworkDiagnosticType | MediaDiagnosticType | ServerDiagnosticType;
|
10809
|
+
|
10803
10810
|
/**
|
10804
10811
|
* State only version of {@link @azure/communication-calling#RemoteParticipant}. {@link StatefulCallClient} will
|
10805
10812
|
* automatically retrieve RemoteParticipants and add their state to the state exposed by {@link StatefulCallClient}.
|
@@ -10866,7 +10873,7 @@ export declare interface RemoteParticipantState {
|
|
10866
10873
|
/**
|
10867
10874
|
* The diagnostic status of RemoteParticipant{@link @azure/communication-calling#RemoteDiagnostics}.
|
10868
10875
|
*/
|
10869
|
-
diagnostics?: Record<
|
10876
|
+
diagnostics?: Partial<Record<RemoteDiagnosticType, RemoteDiagnosticState>>;
|
10870
10877
|
}
|
10871
10878
|
|
10872
10879
|
/**
|
@@ -11661,7 +11668,7 @@ export declare interface SpotlightState {
|
|
11661
11668
|
* Identifier types for initiating a call using the CallAdapter
|
11662
11669
|
* @public
|
11663
11670
|
*/
|
11664
|
-
export declare type StartCallIdentifier =
|
11671
|
+
export declare type StartCallIdentifier = CommunicationIdentifier;
|
11665
11672
|
|
11666
11673
|
/**
|
11667
11674
|
* Options passed to adapter.startCaptions
|
@@ -4,7 +4,7 @@ var react = require('@fluentui/react');
|
|
4
4
|
var reactChat = require('@fluentui-contrib/react-chat');
|
5
5
|
var reactComponents = require('@fluentui/react-components');
|
6
6
|
require('@azure/communication-common');
|
7
|
-
var index = require('./index-
|
7
|
+
var index = require('./index-CsXx8T94.js');
|
8
8
|
var React = require('react');
|
9
9
|
require('reselect');
|
10
10
|
require('@azure/communication-calling');
|
@@ -272,4 +272,4 @@ const ChatMessageComponentAsRichTextEditBox = (props) => {
|
|
272
272
|
|
273
273
|
exports.ChatMessageComponentAsRichTextEditBox = ChatMessageComponentAsRichTextEditBox;
|
274
274
|
exports.default = ChatMessageComponentAsRichTextEditBox;
|
275
|
-
//# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-
|
275
|
+
//# sourceMappingURL=ChatMessageComponentAsRichTextEditBox-DeQgD3wS.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ChatMessageComponentAsRichTextEditBox-DMypxgeJ.js","sources":["../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE, modifyInlineImagesInContentString } from '../../utils/SendBoxUtils';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n hasIncompleteAttachmentUploads,\n removeBrokenImageContentAndClearImageSizeStyles,\n getContentWithUpdatedInlineImagesInfo,\n isMessageTooLong\n} from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport {\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata,\n doesMessageContainMultipleAttachments\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SendBoxErrorBarError, SendBoxErrorBarType } from '../../SendBoxErrorBar';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { BROKEN_IMAGE_SVG_DATA } from '../../styles/Common.style';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { getPreviousInlineImages } from '../../utils/RichTextEditorUtils';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste?: (event: { content: DocumentFragment }) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onRemoveInlineImage?: (imageAttributes: Record<string, string>, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage?: (imageAttributes: Record<string, string>, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress?: AttachmentMetadataInProgress[];\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const {\n onCancel,\n onSubmit,\n strings,\n message,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onRemoveInlineImage\n } = props;\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [initialInlineImages, setInitialInlineImages] = useState<Record<string, string>[]>([]);\n\n const initialContent = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const content = message.content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setInitialInlineImages(getPreviousInlineImages(content));\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n // The broken image element is a div element with all the attributes of the original image element.\n // We need to convert it to a img element so the Rooster knows how to render it.\n // And we need to copy over all the attributes such as id, width, etc.\n // which is needed for sending the message with the images correctly.\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n document.querySelectorAll('.broken-image-wrapper').forEach((brokenImage) => {\n const imageElement = document.createElement('img');\n const attributes = brokenImage.attributes;\n for (const attribute of attributes) {\n imageElement.setAttribute(attribute.name, attribute.value);\n }\n\n imageElement.src = BROKEN_IMAGE_SVG_DATA;\n imageElement.style.width = '3rem';\n imageElement.style.height = '3rem';\n brokenImage.parentElement?.replaceChild(imageElement, brokenImage);\n });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n return document.body.innerHTML;\n return message.content;\n }, [message]);\n\n const [textValue, setTextValue] = useState<string>(initialContent || '');\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [contentValueWithInlineImagesOverflow, setContentValueWithInlineImagesOverflow] = useState(false);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\n );\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = useMemo(() => {\n return getMessageState(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata ?? []);\n }, [/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata, textValue]);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const imageUploadErrorMessage = useMemo(() => {\n return inlineImagesWithProgress?.filter((image) => image.error).pop()?.error?.message;\n }, [inlineImagesWithProgress]);\n\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = useCallback((newValue?: string): void => {\n setTextValue(newValue ?? '');\n }, []);\n\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n\n const textTooLongMessage = useMemo(() => {\n return messageState === 'too long' ||\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ contentValueWithInlineImagesOverflow\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n }, [\n messageState,\n strings.editBoxTextLimit,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ contentValueWithInlineImagesOverflow\n ]);\n\n const iconClassName = useCallback(\n (isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n },\n [theme.palette.accent, theme.palette.neutralSecondary]\n );\n\n const onRenderThemedCancelIcon = useCallback(\n (isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const onRenderThemedSubmitIcon = useCallback(\n (isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n\n const onSubmitHandler = useCallback((): void => {\n if (!submitEnabled) {\n return;\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (inlineImagesWithProgress && inlineImagesWithProgress.length > 0) {\n const contentWithUpdatedInlineImagesInfo = getContentWithUpdatedInlineImagesInfo(\n textValue,\n inlineImagesWithProgress\n );\n const messageTooLong = isMessageTooLong(contentWithUpdatedInlineImagesInfo.length);\n // Set contentValueWithInlineImagesOverflow state to display the error bar\n setContentValueWithInlineImagesOverflow(messageTooLong);\n // The change from the setContentValueOverflow in the previous line will not kick in yet.\n // We need to rely on the local value of messageTooLong to return early if the message is too long.\n if (messageTooLong) {\n return;\n }\n }\n\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (hasIncompleteAttachmentUploads(inlineImagesWithProgress)) {\n setAttachmentUploadsPendingError({\n message: strings.imageUploadsPendingError,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\n let content = textValue;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = removeBrokenImageContentAndClearImageSizeStyles(content);\n let initInlineImages: Record<string, string>[] = [];\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n initInlineImages = initialInlineImages ?? [];\n modifyInlineImagesInContentString(content, initInlineImages, (content: string) => {\n // it's very important to pass an empty attachment here\n // so when user removes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n });\n }, [\n submitEnabled,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n initialInlineImages,\n textValue,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n strings.imageUploadsPendingError,\n onSubmit,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata\n ]);\n\n const actionButtons = useMemo(() => {\n return (\n <Stack horizontal>\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxCancelButton}\n tooltipContent={strings.editBoxCancelButton}\n onRenderIcon={onRenderThemedCancelIcon}\n onClick={() => {\n onCancel && onCancel(message.messageId);\n }}\n id={'dismissIconWrapper'}\n data-testId={strings.editBoxCancelButton}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n onSubmitHandler();\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n onSubmitHandler\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return { ...locale.richTextSendBox, ...strings };\n return locale.sendBox;\n }, [\n /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n /* @conditional-compile-remove(rich-text-editor) */ strings,\n locale.sendBox\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({ type: 'remove', id: attachmentId });\n }, []);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const onChangeHandler = useCallback(\n (\n content: string | undefined,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n removedInlineImages?: Record<string, string>[]\n ) => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n removedInlineImages?.forEach((removedInlineImage: Record<string, string>) => {\n onRemoveInlineImage && onRemoveInlineImage(removedInlineImage, message.messageId);\n });\n setText(content);\n },\n [\n setText,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onRemoveInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ message.messageId\n ]\n );\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors\n textTooLongMessage={textTooLongMessage}\n systemMessage={message.failureReason}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ attachmentUploadsPendingError={\n attachmentUploadsPendingError\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n attachmentProgressError={\n imageUploadErrorMessage\n ? {\n message: imageUploadErrorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.error\n }\n : undefined\n }\n />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={onChangeHandler}\n editorComponentRef={editTextFieldRef}\n initialContent={initialContent}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste={onPaste}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage={\n onInsertInlineImage\n ? (imageAttributes: Record<string, string>) => {\n onInsertInlineImage(imageAttributes, message.messageId);\n }\n : undefined\n }\n />\n </Stack>\n );\n };\n\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return (\n <ChatMyMessage\n attached={attached}\n root={{\n className: mergeClasses(\n chatMyMessageStyles.root,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasMultipleAttachments ? chatMyMessageStyles.multipleAttachmentsInEditing : undefined\n )\n }}\n body={{\n className: mergeClasses(\n editContainerStyles.body,\n attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n )\n }}\n >\n {getContent()}\n </ChatMyMessage>\n );\n};\n\nexport default ChatMessageComponentAsRichTextEditBox;\n"],"names":["useState","useMemo","getPreviousInlineImages","BROKEN_IMAGE_SVG_DATA","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","getContentWithUpdatedInlineImagesInfo","isMessageTooLong","hasIncompleteAttachmentUploads","SendBoxErrorBarType","removeBrokenImageContentAndClearImageSizeStyles","modifyInlineImagesInContentString","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;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A,UAAU,EAAE,CACC,EAChB;AACJ;;;;;"}
|
1
|
+
{"version":3,"file":"ChatMessageComponentAsRichTextEditBox-DeQgD3wS.js","sources":["../../../../react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { ChatMyMessage } from '@fluentui-contrib/react-chat';\nimport { mergeClasses } from '@fluentui/react-components';\nimport { _formatString } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { AttachmentMetadataInProgress } from '@internal/acs-ui-common';\nimport { useTheme } from '../../../theming';\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { useReducer } from 'react';\nimport { editBoxWidthStyles, richTextEditBoxActionButtonIcon } from '../../styles/EditBox.styles';\nimport { InputBoxButton } from '../../InputBoxButton';\nimport { MessageThreadStrings } from '../../MessageThread';\nimport { useChatMyMessageStyles } from '../../styles/MessageThread.styles';\nimport { ChatMessage } from '../../../types';\nimport { _AttachmentUploadCards } from '../../Attachment/AttachmentUploadCards';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { AttachmentMetadata } from '@internal/acs-ui-common';\nimport { useChatMessageRichTextEditContainerStyles } from '../../styles/ChatMessageComponent.styles';\nimport { MAXIMUM_LENGTH_OF_MESSAGE, modifyInlineImagesInContentString } from '../../utils/SendBoxUtils';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport {\n hasIncompleteAttachmentUploads,\n removeBrokenImageContentAndClearImageSizeStyles,\n getContentWithUpdatedInlineImagesInfo,\n isMessageTooLong\n} from '../../utils/SendBoxUtils';\nimport {\n getMessageState,\n onRenderCancelIcon,\n onRenderSubmitIcon\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport {\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata,\n doesMessageContainMultipleAttachments\n} from '../../utils/ChatMessageComponentAsEditBoxUtils';\nimport { RichTextEditorComponentRef } from '../../RichTextEditor/RichTextEditor';\nimport { RichTextInputBoxComponent } from '../../RichTextEditor/RichTextInputBoxComponent';\nimport { editBoxRichTextEditorStyle, richTextActionButtonsStyle } from '../../styles/RichTextEditor.styles';\nimport { RichTextSendBoxErrors } from '../../RichTextEditor/RichTextSendBoxErrors';\nimport { useLocale } from '../../../localization';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { FluentV9ThemeProvider } from '../../../theming/FluentV9ThemeProvider';\n/* @conditional-compile-remove(file-sharing-acs) */\nimport { attachmentUploadCardsStyles } from '../../styles/SendBox.styles';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { SendBoxErrorBarError, SendBoxErrorBarType } from '../../SendBoxErrorBar';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { BROKEN_IMAGE_SVG_DATA } from '../../styles/Common.style';\n/* @conditional-compile-remove(rich-text-editor-image-upload) */\nimport { getPreviousInlineImages } from '../../utils/RichTextEditorUtils';\n\n/** @private */\nexport type ChatMessageComponentAsRichTextEditBoxProps = {\n onCancel?: (messageId: string) => void;\n onSubmit: (\n text: string,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata?: AttachmentMetadata[]\n ) => void;\n message: ChatMessage;\n strings: MessageThreadStrings;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste?: (event: { content: DocumentFragment }) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onRemoveInlineImage?: (imageAttributes: Record<string, string>, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage?: (imageAttributes: Record<string, string>, messageId: string) => void;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress?: AttachmentMetadataInProgress[];\n};\n\n/**\n * @private\n */\nexport const ChatMessageComponentAsRichTextEditBox = (\n props: ChatMessageComponentAsRichTextEditBoxProps\n): JSX.Element => {\n const {\n onCancel,\n onSubmit,\n strings,\n message,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onRemoveInlineImage\n } = props;\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [initialInlineImages, setInitialInlineImages] = useState<Record<string, string>[]>([]);\n\n const initialContent = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const content = message.content;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setInitialInlineImages(getPreviousInlineImages(content));\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const document = new DOMParser().parseFromString(content ?? '', 'text/html');\n // The broken image element is a div element with all the attributes of the original image element.\n // We need to convert it to a img element so the Rooster knows how to render it.\n // And we need to copy over all the attributes such as id, width, etc.\n // which is needed for sending the message with the images correctly.\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n document.querySelectorAll('.broken-image-wrapper').forEach((brokenImage) => {\n const imageElement = document.createElement('img');\n const attributes = brokenImage.attributes;\n for (const attribute of attributes) {\n imageElement.setAttribute(attribute.name, attribute.value);\n }\n\n imageElement.src = BROKEN_IMAGE_SVG_DATA;\n imageElement.style.width = '3rem';\n imageElement.style.height = '3rem';\n brokenImage.parentElement?.replaceChild(imageElement, brokenImage);\n });\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n return document.body.innerHTML;\n return message.content;\n }, [message]);\n\n const [textValue, setTextValue] = useState<string>(initialContent || '');\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [contentValueWithInlineImagesOverflow, setContentValueWithInlineImagesOverflow] = useState(false);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const [attachmentMetadata, handleAttachmentAction] = useReducer(\n attachmentMetadataReducer,\n getMessageWithAttachmentMetadata(message) ?? []\n );\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const [attachmentUploadsPendingError, setAttachmentUploadsPendingError] = useState<SendBoxErrorBarError | undefined>(\n undefined\n );\n const editTextFieldRef = React.useRef<RichTextEditorComponentRef>(null);\n const theme = useTheme();\n const messageState = useMemo(() => {\n return getMessageState(textValue, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata ?? []);\n }, [/* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata, textValue]);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n const imageUploadErrorMessage = useMemo(() => {\n return inlineImagesWithProgress?.filter((image) => image.error).pop()?.error?.message;\n }, [inlineImagesWithProgress]);\n\n const submitEnabled = messageState === 'OK';\n\n const editContainerStyles = useChatMessageRichTextEditContainerStyles();\n const chatMyMessageStyles = useChatMyMessageStyles();\n const locale = useLocale().strings;\n\n const setText = useCallback((newValue?: string): void => {\n setTextValue(newValue ?? '');\n }, []);\n\n useEffect(() => {\n editTextFieldRef.current?.focus();\n }, []);\n\n const textTooLongMessage = useMemo(() => {\n return messageState === 'too long' ||\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ contentValueWithInlineImagesOverflow\n ? _formatString(strings.editBoxTextLimit, { limitNumber: `${MAXIMUM_LENGTH_OF_MESSAGE}` })\n : undefined;\n }, [\n messageState,\n strings.editBoxTextLimit,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ contentValueWithInlineImagesOverflow\n ]);\n\n const iconClassName = useCallback(\n (isHover: boolean) => {\n const color = isHover ? theme.palette.accent : theme.palette.neutralSecondary;\n return mergeStyles(richTextEditBoxActionButtonIcon, { color });\n },\n [theme.palette.accent, theme.palette.neutralSecondary]\n );\n\n const onRenderThemedCancelIcon = useCallback(\n (isHover: boolean) => {\n return onRenderCancelIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n const onRenderThemedSubmitIcon = useCallback(\n (isHover: boolean) => {\n return onRenderSubmitIcon(iconClassName(isHover));\n },\n [iconClassName]\n );\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const hasMultipleAttachments = useMemo(() => {\n return doesMessageContainMultipleAttachments(message);\n }, [message]);\n\n const onSubmitHandler = useCallback((): void => {\n if (!submitEnabled) {\n return;\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (inlineImagesWithProgress && inlineImagesWithProgress.length > 0) {\n const contentWithUpdatedInlineImagesInfo = getContentWithUpdatedInlineImagesInfo(\n textValue,\n inlineImagesWithProgress\n );\n const messageTooLong = isMessageTooLong(contentWithUpdatedInlineImagesInfo.length);\n // Set contentValueWithInlineImagesOverflow state to display the error bar\n setContentValueWithInlineImagesOverflow(messageTooLong);\n // The change from the setContentValueOverflow in the previous line will not kick in yet.\n // We need to rely on the local value of messageTooLong to return early if the message is too long.\n if (messageTooLong) {\n return;\n }\n }\n\n // Don't send message until all attachments have been uploaded successfully\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n setAttachmentUploadsPendingError(undefined);\n\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n if (hasIncompleteAttachmentUploads(inlineImagesWithProgress)) {\n setAttachmentUploadsPendingError({\n message: strings.imageUploadsPendingError,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.info\n });\n return;\n }\n\n let content = textValue;\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n content = removeBrokenImageContentAndClearImageSizeStyles(content);\n let initInlineImages: Record<string, string>[] = [];\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n initInlineImages = initialInlineImages ?? [];\n modifyInlineImagesInContentString(content, initInlineImages, (content: string) => {\n // it's very important to pass an empty attachment here\n // so when user removes all attachments, UI can reflect it instantly\n // if you set it to undefined, the attachments pre-edited would still be there\n // until edit message event is received\n onSubmit(content, /* @conditional-compile-remove(file-sharing-acs) */ attachmentMetadata || []);\n });\n }, [\n submitEnabled,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n inlineImagesWithProgress,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n initialInlineImages,\n textValue,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n strings.imageUploadsPendingError,\n onSubmit,\n /* @conditional-compile-remove(file-sharing-acs) */\n attachmentMetadata\n ]);\n\n const actionButtons = useMemo(() => {\n return (\n <Stack horizontal>\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxCancelButton}\n tooltipContent={strings.editBoxCancelButton}\n onRenderIcon={onRenderThemedCancelIcon}\n onClick={() => {\n onCancel && onCancel(message.messageId);\n }}\n id={'dismissIconWrapper'}\n data-testId={strings.editBoxCancelButton}\n />\n <InputBoxButton\n className={richTextActionButtonsStyle}\n ariaLabel={strings.editBoxSubmitButton}\n tooltipContent={strings.editBoxSubmitButton}\n onRenderIcon={onRenderThemedSubmitIcon}\n onClick={(e) => {\n onSubmitHandler();\n e.stopPropagation();\n }}\n id={'submitIconWrapper'}\n data-testId={strings.editBoxSubmitButton}\n />\n </Stack>\n );\n }, [\n message.messageId,\n onCancel,\n onRenderThemedCancelIcon,\n onRenderThemedSubmitIcon,\n strings.editBoxCancelButton,\n strings.editBoxSubmitButton,\n onSubmitHandler\n ]);\n const richTextLocaleStrings = useMemo(() => {\n /* @conditional-compile-remove(rich-text-editor) */\n return { ...locale.richTextSendBox, ...strings };\n return locale.sendBox;\n }, [\n /* @conditional-compile-remove(rich-text-editor) */ locale.richTextSendBox,\n /* @conditional-compile-remove(rich-text-editor) */ strings,\n locale.sendBox\n ]);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onCancelAttachmentUpload = useCallback((attachmentId: string) => {\n // edit box only capable of removing attachments\n // we need to expand attachment actions\n // if we want to support more actions e.g. add\n handleAttachmentAction({ type: 'remove', id: attachmentId });\n }, []);\n\n /* @conditional-compile-remove(file-sharing-acs) */\n const onRenderAttachmentUploads = useCallback(() => {\n return (\n <Stack className={attachmentUploadCardsStyles}>\n <FluentV9ThemeProvider v8Theme={theme}>\n <_AttachmentUploadCards\n attachments={attachmentMetadata}\n onCancelAttachmentUpload={onCancelAttachmentUpload}\n />\n </FluentV9ThemeProvider>\n </Stack>\n );\n }, [attachmentMetadata, onCancelAttachmentUpload, theme]);\n\n const onChangeHandler = useCallback(\n (\n content: string | undefined,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n removedInlineImages?: Record<string, string>[]\n ) => {\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n removedInlineImages?.forEach((removedInlineImage: Record<string, string>) => {\n onRemoveInlineImage && onRemoveInlineImage(removedInlineImage, message.messageId);\n });\n setText(content);\n },\n [\n setText,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ onRemoveInlineImage,\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ message.messageId\n ]\n );\n\n const getContent = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(editBoxWidthStyles)}>\n <RichTextSendBoxErrors\n textTooLongMessage={textTooLongMessage}\n systemMessage={message.failureReason}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */ attachmentUploadsPendingError={\n attachmentUploadsPendingError\n }\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n attachmentProgressError={\n imageUploadErrorMessage\n ? {\n message: imageUploadErrorMessage,\n timestamp: Date.now(),\n errorBarType: SendBoxErrorBarType.error\n }\n : undefined\n }\n />\n <RichTextInputBoxComponent\n placeholderText={strings.editBoxPlaceholderText}\n onChange={onChangeHandler}\n editorComponentRef={editTextFieldRef}\n initialContent={initialContent}\n strings={richTextLocaleStrings}\n disabled={false}\n actionComponents={actionButtons}\n richTextEditorStyleProps={editBoxRichTextEditorStyle}\n isHorizontalLayoutDisabled={true}\n /* @conditional-compile-remove(file-sharing-acs) */\n onRenderAttachmentUploads={onRenderAttachmentUploads}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onPaste={onPaste}\n /* @conditional-compile-remove(rich-text-editor-image-upload) */\n onInsertInlineImage={\n onInsertInlineImage\n ? (imageAttributes: Record<string, string>) => {\n onInsertInlineImage(imageAttributes, message.messageId);\n }\n : undefined\n }\n />\n </Stack>\n );\n };\n\n const attached = message.attached === true ? 'center' : message.attached === 'bottom' ? 'bottom' : 'top';\n return (\n <ChatMyMessage\n attached={attached}\n root={{\n className: mergeClasses(\n chatMyMessageStyles.root,\n /* @conditional-compile-remove(file-sharing-acs) */\n hasMultipleAttachments ? chatMyMessageStyles.multipleAttachmentsInEditing : undefined\n )\n }}\n body={{\n className: mergeClasses(\n editContainerStyles.body,\n attached !== 'top' ? editContainerStyles.bodyAttached : undefined\n )\n }}\n >\n {getContent()}\n </ChatMyMessage>\n );\n};\n\nexport default ChatMessageComponentAsRichTextEditBox;\n"],"names":["useState","useMemo","getPreviousInlineImages","BROKEN_IMAGE_SVG_DATA","useReducer","attachmentMetadataReducer","getMessageWithAttachmentMetadata","useTheme","getMessageState","useChatMessageRichTextEditContainerStyles","useChatMyMessageStyles","useLocale","useCallback","useEffect","_formatString","MAXIMUM_LENGTH_OF_MESSAGE","mergeStyles","richTextEditBoxActionButtonIcon","onRenderCancelIcon","onRenderSubmitIcon","doesMessageContainMultipleAttachments","getContentWithUpdatedInlineImagesInfo","isMessageTooLong","hasIncompleteAttachmentUploads","SendBoxErrorBarType","removeBrokenImageContentAndClearImageSizeStyles","modifyInlineImagesInContentString","Stack","InputBoxButton","richTextActionButtonsStyle","attachmentUploadCardsStyles","FluentV9ThemeProvider","_AttachmentUploadCards","editBoxWidthStyles","RichTextSendBoxErrors","RichTextInputBoxComponent","editBoxRichTextEditorStyle","ChatMyMessage","mergeClasses"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA4EA;;AAEG;AACU,MAAA,qCAAqC,GAAG,CACnD,KAAiD,KAClC;;AACf,IAAA,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO;;IAEP,OAAO;;IAEP,mBAAmB;;IAEnB,wBAAwB;;IAExB,mBAAmB,EACpB,GAAG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sB,EAC/C,QAAQ,EAAE,eAAe,EACzB,kBAAkB,EAAE,gBAAgB,EACpC,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,KAAK,EACf,gBAAgB,EAAE,aAAa,EAC/B,wBAAwB,EAAEC,gCAA0B,EACpD,0BAA0B,EAAE,IAAI;;AAEhC,gBAAA,yBAAyB,EAAE,yBAAyB;;AAEpD,gBAAA,OAAO,EAAE,OAAO;;AAEhB,gBAAA,mBAAmB,EACjB,mBAAmB;AACjB,sBAAE,CAAC,eAAuC,KAAI;AAC1C,wBAAA,mBAAmB,CAAC,eAAe,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;qBACzD;AACH,sBAAE,SAAS,EAEf,CAAA,CACI,EACR;AACJ,KAAC,CAAC;IAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IACzG,QACE,oBAACC,uBAAa,EAAA,EACZ,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE;AACJ,YAAA,SAAS,EAAEC,4BAAY,CACrB,mBAAmB,CAAC,IAAI;;YAExB,sBAAsB,GAAG,mBAAmB,CAAC,4BAA4B,GAAG,SAAS,CACtF;AACF,SAAA,EACD,IAAI,EAAE;YACJ,SAAS,EAAEA,4BAAY,CACrB,mBAAmB,CAAC,IAAI,EACxB,QAAQ,KAAK,KAAK,GAAG,mBAAmB,CAAC,YAAY,GAAG,SAAS,CAClE;AACF,SAAA,EAAA,EAEA,UAAU,EAAE,CACC,EAChB;AACJ;;;;;"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
var React = require('react');
|
4
|
-
var index = require('./index-
|
4
|
+
var index = require('./index-CsXx8T94.js');
|
5
5
|
require('@fluentui/react');
|
6
6
|
require('@azure/communication-common');
|
7
7
|
require('@fluentui/react-components');
|
@@ -49,4 +49,4 @@ const RichTextSendBoxWrapper = (props) => {
|
|
49
49
|
};
|
50
50
|
|
51
51
|
exports.RichTextSendBoxWrapper = RichTextSendBoxWrapper;
|
52
|
-
//# sourceMappingURL=RichTextSendBoxWrapper-
|
52
|
+
//# sourceMappingURL=RichTextSendBoxWrapper-DKalJ_L9.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RichTextSendBoxWrapper-
|
1
|
+
{"version":3,"file":"RichTextSendBoxWrapper-DKalJ_L9.js","sources":["../../../../react-composites/src/composites/common/RichTextSendBoxWrapper.tsx"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport React from 'react';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { usePropsFor } from '../ChatComposite/hooks/usePropsFor';\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\nimport { RichTextSendBox, RichTextSendBoxProps } from '@internal/react-components';\n\n/* @conditional-compile-remove(rich-text-editor-composite-support) */\n/**\n * @private\n *\n * Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox\n * before lazyLoading is done\n */\nexport const RichTextSendBoxWrapper = (props: RichTextSendBoxProps): JSX.Element => {\n const richTextSendBoxProps = usePropsFor(RichTextSendBox);\n\n return <RichTextSendBox {...richTextSendBoxProps} {...props} />;\n};\n"],"names":["usePropsFor","RichTextSendBox"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEA;AAOA;AACA;;;;;AAKG;AACU,MAAA,sBAAsB,GAAG,CAAC,KAA2B,KAAiB;AACjF,IAAA,MAAM,oBAAoB,GAAGA,iBAAW,CAACC,qBAAe,CAAC,CAAC;AAE1D,IAAA,OAAO,oBAACA,qBAAe,EAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,oBAAoB,EAAM,KAAK,EAAI,CAAC;AAClE;;;;"}
|
@@ -188,7 +188,7 @@ function getDefaultExportFromCjs (x) {
|
|
188
188
|
// Copyright (c) Microsoft Corporation.
|
189
189
|
// Licensed under the MIT License.
|
190
190
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
191
|
-
var telemetryVersion = '1.21.0-alpha-
|
191
|
+
var telemetryVersion = '1.21.0-alpha-202410250016';
|
192
192
|
|
193
193
|
|
194
194
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -696,14 +696,14 @@ const isTeamsCallParticipants = (participants) => {
|
|
696
696
|
};
|
697
697
|
/**
|
698
698
|
* @private
|
699
|
-
* Checks whether the user is a 'Ringing' PSTN user.
|
699
|
+
* Checks whether the user is a 'Ringing' PSTN user or in a 'Connecting' state.
|
700
700
|
*/
|
701
701
|
const _convertParticipantState = (participant) => {
|
702
702
|
var _a;
|
703
703
|
/* @conditional-compile-remove(remote-ufd) */
|
704
704
|
if (participant.diagnostics &&
|
705
|
-
participant.diagnostics['
|
706
|
-
((_a = participant.diagnostics['
|
705
|
+
participant.diagnostics['serverConnection'] &&
|
706
|
+
((_a = participant.diagnostics['serverConnection']) === null || _a === void 0 ? void 0 : _a.value) === false) {
|
707
707
|
return 'Reconnecting';
|
708
708
|
}
|
709
709
|
return communicationCommon.isPhoneNumberIdentifier(participant.identifier) && participant.state === 'Connecting'
|
@@ -738,6 +738,20 @@ const createLocalVideoStream = (callClient) => __awaiter$$(void 0, void 0, void
|
|
738
738
|
}
|
739
739
|
return undefined;
|
740
740
|
});
|
741
|
+
/**
|
742
|
+
* Get call state if existing, if not and the call not exists in ended record return undefined, if it never exists, throw an error.
|
743
|
+
* @private
|
744
|
+
*/
|
745
|
+
const getCallStateIfExist = (state, callId) => {
|
746
|
+
if (!state.calls[callId]) {
|
747
|
+
// If call has ended, we don't need to throw an error.
|
748
|
+
if (state.callsEnded[callId]) {
|
749
|
+
return undefined;
|
750
|
+
}
|
751
|
+
throw new Error(`Call Not Found: ${callId}`);
|
752
|
+
}
|
753
|
+
return state.calls[callId];
|
754
|
+
};
|
741
755
|
|
742
756
|
// Copyright (c) Microsoft Corporation.
|
743
757
|
// Licensed under the MIT License.
|
@@ -1067,9 +1081,9 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1067
1081
|
if (!call) {
|
1068
1082
|
return;
|
1069
1083
|
}
|
1070
|
-
const callState = callClient.getState()
|
1084
|
+
const callState = getCallStateIfExist(callClient.getState(), call.id);
|
1071
1085
|
if (!callState) {
|
1072
|
-
|
1086
|
+
return;
|
1073
1087
|
}
|
1074
1088
|
const participant = Object.values(callState.remoteParticipants).find((participant) => toFlatCommunicationIdentifier(participant.identifier) === userId);
|
1075
1089
|
if (!participant || !participant.videoStreams) {
|
@@ -1104,9 +1118,9 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1104
1118
|
if (!call) {
|
1105
1119
|
return;
|
1106
1120
|
}
|
1107
|
-
const callState = callClient.getState()
|
1121
|
+
const callState = getCallStateIfExist(callClient.getState(), call.id);
|
1108
1122
|
if (!callState) {
|
1109
|
-
|
1123
|
+
return;
|
1110
1124
|
}
|
1111
1125
|
const participant = Object.values(callState.remoteParticipants).find((participant) => toFlatCommunicationIdentifier(participant.identifier) === userId);
|
1112
1126
|
if (!participant || !participant.videoStreams) {
|
@@ -1125,43 +1139,47 @@ const createDefaultCommonCallingHandlers = memoizeOne((callClient, deviceManager
|
|
1125
1139
|
if (!call) {
|
1126
1140
|
return;
|
1127
1141
|
}
|
1128
|
-
const callState = callClient.getState()
|
1142
|
+
const callState = getCallStateIfExist(callClient.getState(), call.id);
|
1129
1143
|
if (!callState) {
|
1130
|
-
|
1144
|
+
return;
|
1131
1145
|
}
|
1132
1146
|
const participant = Object.values(callState.remoteParticipants).find((participant) => toFlatCommunicationIdentifier(participant.identifier) === userId);
|
1133
1147
|
if (!participant || !participant.videoStreams) {
|
1134
1148
|
return;
|
1135
1149
|
}
|
1136
|
-
const remoteVideoStream = Object.values(participant.videoStreams).
|
1137
|
-
|
1138
|
-
|
1150
|
+
const remoteVideoStream = Object.values(participant.videoStreams).filter((i) => i.mediaStreamType === 'Video');
|
1151
|
+
for (const stream of remoteVideoStream) {
|
1152
|
+
if (stream.view) {
|
1153
|
+
callClient.disposeView(call.id, participant.identifier, stream);
|
1154
|
+
}
|
1139
1155
|
}
|
1140
1156
|
});
|
1141
1157
|
const onDisposeRemoteScreenShareStreamView = (userId) => __awaiter$_(void 0, void 0, void 0, function* () {
|
1142
1158
|
if (!call) {
|
1143
1159
|
return;
|
1144
1160
|
}
|
1145
|
-
const callState = callClient.getState()
|
1161
|
+
const callState = getCallStateIfExist(callClient.getState(), call.id);
|
1146
1162
|
if (!callState) {
|
1147
|
-
|
1163
|
+
return;
|
1148
1164
|
}
|
1149
1165
|
const participant = Object.values(callState.remoteParticipants).find((participant) => toFlatCommunicationIdentifier(participant.identifier) === userId);
|
1150
1166
|
if (!participant || !participant.videoStreams) {
|
1151
1167
|
return;
|
1152
1168
|
}
|
1153
|
-
const
|
1154
|
-
|
1155
|
-
|
1169
|
+
const screenShareStreams = Object.values(participant.videoStreams).filter((i) => i.mediaStreamType === 'ScreenSharing');
|
1170
|
+
for (const stream of screenShareStreams) {
|
1171
|
+
if (stream.view) {
|
1172
|
+
callClient.disposeView(call.id, participant.identifier, stream);
|
1173
|
+
}
|
1156
1174
|
}
|
1157
1175
|
});
|
1158
1176
|
const onDisposeLocalScreenShareStreamView = () => __awaiter$_(void 0, void 0, void 0, function* () {
|
1159
1177
|
if (!call) {
|
1160
1178
|
return;
|
1161
1179
|
}
|
1162
|
-
const callState = callClient.getState()
|
1180
|
+
const callState = getCallStateIfExist(callClient.getState(), call.id);
|
1163
1181
|
if (!callState) {
|
1164
|
-
|
1182
|
+
return;
|
1165
1183
|
}
|
1166
1184
|
const screenShareStream = callState === null || callState === void 0 ? void 0 : callState.localVideoStreams.find((item) => item.mediaStreamType === 'ScreenSharing');
|
1167
1185
|
if (screenShareStream && screenShareStream.view) {
|
@@ -4547,6 +4565,7 @@ class UserFacingDiagnosticsSubscriber {
|
|
4547
4565
|
/* @conditional-compile-remove(remote-ufd) */
|
4548
4566
|
remoteDiagnosticsChanged(args) {
|
4549
4567
|
this._context.modifyState((state) => {
|
4568
|
+
var _a;
|
4550
4569
|
const call = state.calls[this._callIdRef.callId];
|
4551
4570
|
if (call === undefined) {
|
4552
4571
|
return;
|
@@ -4555,7 +4574,7 @@ class UserFacingDiagnosticsSubscriber {
|
|
4555
4574
|
const { remoteParticipant: _, rawId } = diagnostic, participantDiagnostic = __rest(diagnostic, ["remoteParticipant", "rawId"]);
|
4556
4575
|
const participant = call.remoteParticipants[rawId];
|
4557
4576
|
if (participant) {
|
4558
|
-
participant.diagnostics = participant.diagnostics
|
4577
|
+
participant.diagnostics = (_a = participant.diagnostics) !== null && _a !== void 0 ? _a : {};
|
4559
4578
|
participant.diagnostics[participantDiagnostic.diagnostic] = participantDiagnostic;
|
4560
4579
|
}
|
4561
4580
|
}
|
@@ -15288,7 +15307,7 @@ class _ErrorBoundary extends React.Component {
|
|
15288
15307
|
// Copyright (c) Microsoft Corporation.
|
15289
15308
|
// Licensed under the MIT License.
|
15290
15309
|
/* @conditional-compile-remove(rich-text-editor) */
|
15291
|
-
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-
|
15310
|
+
const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DeQgD3wS.js'); }));
|
15292
15311
|
/**
|
15293
15312
|
* @private
|
15294
15313
|
* Use this function to load RoosterJS dependencies early in the lifecycle.
|
@@ -15296,7 +15315,7 @@ const ChatMessageComponentAsRichTextEditBox = React.lazy(() => Promise.resolve()
|
|
15296
15315
|
*
|
15297
15316
|
* @conditional-compile-remove(rich-text-editor)
|
15298
15317
|
*/
|
15299
|
-
const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-
|
15318
|
+
const loadChatMessageComponentAsRichTextEditBox = () => Promise.resolve().then(function () { return require('./ChatMessageComponentAsRichTextEditBox-DeQgD3wS.js'); });
|
15300
15319
|
/**
|
15301
15320
|
* @private
|
15302
15321
|
*/
|
@@ -17445,6 +17464,13 @@ const drawerMenuWrapperStyles = {
|
|
17445
17464
|
}
|
17446
17465
|
};
|
17447
17466
|
|
17467
|
+
// Copyright (c) Microsoft Corporation.
|
17468
|
+
// Licensed under the MIT License.
|
17469
|
+
/**
|
17470
|
+
* @private
|
17471
|
+
*/
|
17472
|
+
const callingComponentLogger = logger.createClientLogger('communication-react:calling-component');
|
17473
|
+
|
17448
17474
|
// Copyright (c) Microsoft Corporation.
|
17449
17475
|
// Licensed under the MIT License.
|
17450
17476
|
/**
|
@@ -17483,6 +17509,9 @@ const useVideoStreamLifecycleMaintainer = (props) => {
|
|
17483
17509
|
onDisposeStreamView === null || onDisposeStreamView === void 0 ? void 0 : onDisposeStreamView();
|
17484
17510
|
}
|
17485
17511
|
}
|
17512
|
+
else {
|
17513
|
+
callingComponentLogger.warning('Stream view element does not exist when disposing stream view');
|
17514
|
+
}
|
17486
17515
|
};
|
17487
17516
|
}, [
|
17488
17517
|
isMirrored,
|
@@ -17696,7 +17725,7 @@ const useVideoTileContextualMenuProps = (props) => {
|
|
17696
17725
|
if (items.length === 0) {
|
17697
17726
|
return undefined;
|
17698
17727
|
}
|
17699
|
-
return { items, styles: {}, calloutProps: { preventDismissOnEvent: _preventDismissOnEvent } };
|
17728
|
+
return { items, styles: {}, calloutProps: { preventDismissOnEvent: _preventDismissOnEvent }, shouldFocusOnContainer: false };
|
17700
17729
|
}, [
|
17701
17730
|
scalingMode,
|
17702
17731
|
strings,
|
@@ -23564,10 +23593,9 @@ const _TagsSurvey = (props) => {
|
|
23564
23593
|
if (checked) {
|
23565
23594
|
if (issue) {
|
23566
23595
|
setSelectedTags((prevState) => {
|
23567
|
-
|
23568
|
-
|
23569
|
-
|
23570
|
-
prevState[issueCategory].issues = [...existingIssues, issue];
|
23596
|
+
const category = prevState === null || prevState === void 0 ? void 0 : prevState[issueCategory];
|
23597
|
+
if (category && category.issues) {
|
23598
|
+
category.issues = [category.issues, issue];
|
23571
23599
|
}
|
23572
23600
|
else {
|
23573
23601
|
prevState[issueCategory] = { issues: [issue] };
|
@@ -29752,7 +29780,7 @@ const AttachmentDownloadErrorBar = (props) => {
|
|
29752
29780
|
/**
|
29753
29781
|
* Wrapper for RichTextSendBox component to allow us to use usePropsFor with richTextSendBox with lazy loading
|
29754
29782
|
*/
|
29755
|
-
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-
|
29783
|
+
const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DKalJ_L9.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper })));
|
29756
29784
|
/**
|
29757
29785
|
* @private
|
29758
29786
|
* Use this function to load RoosterJS dependencies early in the lifecycle.
|
@@ -29760,7 +29788,7 @@ const RichTextSendBoxWrapper = React.lazy(() => Promise.resolve().then(function
|
|
29760
29788
|
*
|
29761
29789
|
/* @conditional-compile-remove(rich-text-editor-composite-support)
|
29762
29790
|
*/
|
29763
|
-
const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-
|
29791
|
+
const loadRichTextSendBox = () => Promise.resolve().then(function () { return require('./RichTextSendBoxWrapper-DKalJ_L9.js'); }).then((module) => ({ default: module.RichTextSendBoxWrapper }));
|
29764
29792
|
/**
|
29765
29793
|
* @private
|
29766
29794
|
*/
|
@@ -33294,6 +33322,7 @@ const DesktopMoreButton = (props) => {
|
|
33294
33322
|
} }, element));
|
33295
33323
|
});
|
33296
33324
|
return (React.createElement(MoreButton, Object.assign({}, props, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: {
|
33325
|
+
shouldFocusOnContainer: false,
|
33297
33326
|
items: moreButtonContextualMenuItems,
|
33298
33327
|
calloutProps: {
|
33299
33328
|
preventDismissOnEvent: _preventDismissOnEvent
|
@@ -37604,7 +37633,8 @@ const startCallButtonContainerStyleMobile = {
|
|
37604
37633
|
const startCallButtonStyleMobile = react.mergeStyles({
|
37605
37634
|
width: '100%',
|
37606
37635
|
maxWidth: 'unset',
|
37607
|
-
borderRadius: '0.25rem'
|
37636
|
+
borderRadius: '0.25rem',
|
37637
|
+
height: '3.25rem'
|
37608
37638
|
});
|
37609
37639
|
/**
|
37610
37640
|
* @private
|
@@ -44232,4 +44262,4 @@ exports.useTeamsCall = useTeamsCall;
|
|
44232
44262
|
exports.useTeamsCallAdapter = useTeamsCallAdapter;
|
44233
44263
|
exports.useTeamsCallAgent = useTeamsCallAgent;
|
44234
44264
|
exports.useTheme = useTheme;
|
44235
|
-
//# sourceMappingURL=index-
|
44265
|
+
//# sourceMappingURL=index-CsXx8T94.js.map
|